Skip to content

Collection schema get from go-sdk can`t get the dynamic field #32918

Discussion options

You must be logged in to vote

It is by design. All the SDKs follow this behavior.
The dynamic field is not a standard field, controlled by the enable_dynamic_field of CollectionSchema, not listed in fields. Each collection has at most one dynamic field. The datatype of a dynamic field is JSON.

You can use the flag enable_dynamic_field of CollectionSchema to check whether there is a dynamic field inside the collection.

For example, in python sdk:

fields=[
    FieldSchema(name="id", dtype=DataType.INT64, is_primary=True, auto_id=True),
    FieldSchema(name="vector", dtype = DataType.FLOAT_VECTOR, dim=dim),
]

schema = CollectionSchema(fields=fields, enable_dynamic_field=True)

collection = Collection(name=collection_nam…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Mutezebra
Comment options

Answer selected by Mutezebra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants