Package io.milvus.response
Class DescCollResponseWrapper
- java.lang.Object
-
- io.milvus.response.DescCollResponseWrapper
-
public class DescCollResponseWrapper extends Object
Util class to wrap response ofdescribeCollectioninterface.
-
-
Constructor Summary
Constructors Constructor Description DescCollResponseWrapper(DescribeCollectionResponse response)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description List<String>getAliases()Get aliases of the collection.StringgetCollectionDescription()Get description of the collection.longgetCollectionID()Get internal id of the collection.StringgetCollectionName()Get name of the collection.ConsistencyLevelEnumgetConsistencyLevel()Get consistency level of the collection.longgetCreatedUtcTimestamp()Get utc timestamp when collection created.StringgetDatabaseName()Get database name of the collection.booleangetEnableDynamicField()Deprecated.FieldTypegetFieldByName(String fieldName)Get schema of a field by name.List<FieldType>getFields()Get schema of the collection's fields.FieldTypegetPartitionKeyField()Get the partition key field.FieldTypegetPrimaryField()Get the primary key field.Map<String,String>getProperties()Get properties of the collection.intgetReplicaNumber()return collection replica numberList<String>getResourceGroups()return collection resource groupsCollectionSchemaParamgetSchema()Get the collection schema of collectionintgetShardNumber()Get shard number of the collection.FieldTypegetVectorField()Deprecated.List<FieldType>getVectorFields()Get all the vector key field.booleanisDynamicFieldEnabled()Get whether the collection dynamic field is enabledStringtoString()Construct aStringbyDescCollResponseWrapperinstance.
-
-
-
Constructor Detail
-
DescCollResponseWrapper
public DescCollResponseWrapper(DescribeCollectionResponse response)
-
-
Method Detail
-
getCollectionName
public String getCollectionName()
Get name of the collection.- Returns:
Stringname of the collection
-
getDatabaseName
public String getDatabaseName()
Get database name of the collection.- Returns:
Stringname of the database
-
getCollectionDescription
public String getCollectionDescription()
Get description of the collection.- Returns:
Stringdescription of the collection
-
getCollectionID
public long getCollectionID()
Get internal id of the collection.- Returns:
longinternal id of the collection
-
getShardNumber
public int getShardNumber()
Get shard number of the collection.- Returns:
intshard number of the collection
-
getConsistencyLevel
public ConsistencyLevelEnum getConsistencyLevel()
Get consistency level of the collection.- Returns:
ConsistencyLevelEnumconsistency level of the collection
-
getCreatedUtcTimestamp
public long getCreatedUtcTimestamp()
Get utc timestamp when collection created.- Returns:
longutc timestamp when collection created
-
getAliases
public List<String> getAliases()
Get aliases of the collection.- Returns:
- List of String, aliases of the collection
-
getFields
public List<FieldType> getFields()
Get schema of the collection's fields.- Returns:
- List of FieldType, schema of the collection's fields
-
getFieldByName
public FieldType getFieldByName(String fieldName)
Get schema of a field by name. Return null if the field doesn't exist- Parameters:
fieldName- field name to get field description- Returns:
FieldTypeschema of the field
-
getEnableDynamicField
@Deprecated public boolean getEnableDynamicField()
Deprecated.
-
isDynamicFieldEnabled
public boolean isDynamicFieldEnabled()
Get whether the collection dynamic field is enabled- Returns:
- boolean
-
getPartitionKeyField
public FieldType getPartitionKeyField()
Get the partition key field. Return null if the partition key field doesn't exist.- Returns:
FieldTypeschema of the partition key field
-
getPrimaryField
public FieldType getPrimaryField()
Get the primary key field. throw ParamException if the primary key field doesn't exist.- Returns:
FieldTypeschema of the primary key field
-
getVectorField
@Deprecated public FieldType getVectorField()
Deprecated.Get the vector key field. throw ParamException if the vector key field doesn't exist. This method is deprecated since Milvus supports multiple vector fields from v2.4- Returns:
FieldTypeschema of the vector key field
-
getVectorFields
public List<FieldType> getVectorFields()
Get all the vector key field. (Milvus supports multiple vector fields from v2.4)- Returns:
FieldTypeschema of the vector key field
-
getProperties
public Map<String,String> getProperties()
Get properties of the collection.- Returns:
- List of String, aliases of the collection
-
getSchema
public CollectionSchemaParam getSchema()
Get the collection schema of collection- Returns:
CollectionSchemaParamschema of the collection
-
getResourceGroups
public List<String> getResourceGroups()
return collection resource groups- Returns:
- resource group names
-
getReplicaNumber
public int getReplicaNumber()
return collection replica number- Returns:
- replica number
-
toString
public String toString()
Construct aStringbyDescCollResponseWrapperinstance.
-
-