Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Fix describe miss some params" #1754

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions pymilvus/client/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,25 @@ def __pack(self, raw: Any):
self.indexes.extend([index_dict])

def dict(self):
return {
_dict = {
"field_id": self.field_id,
"name": self.name,
"description": self.description,
"type": self.type,
"params": self.params or {},
"element_type": self.element_type,
"is_primary": self.is_primary,
"auto_id": self.auto_id,
"is_partition_key": self.is_partition_key,
"is_dynamic": self.is_dynamic,
}

if self.is_partition_key:
_dict["is_partition_key"] = True
if self.is_dynamic:
_dict["is_dynamic"] = True
if self.auto_id:
_dict["auto_id"] = True
if self.is_primary:
_dict["is_primary"] = self.is_primary
return _dict


class CollectionSchema:
def __init__(self, raw: Any):
Expand Down Expand Up @@ -162,8 +168,9 @@ def dict(self):
"consistency_level": self.consistency_level,
"properties": self.properties,
"num_partitions": self.num_partitions,
"enable_dynamic_field": self.enable_dynamic_field,
}
if self.enable_dynamic_field:
_dict["enable_dynamic_field"] = self.enable_dynamic_field
self._rewrite_schema_dict(_dict)
return _dict

Expand Down
Loading