Package io.milvus.response
Class FieldDataWrapper
- java.lang.Object
-
- io.milvus.response.FieldDataWrapper
-
public class FieldDataWrapper extends java.lang.ObjectUtility class to wrap response ofquery/searchinterface.
-
-
Constructor Summary
Constructors Constructor Description FieldDataWrapper(@NonNull io.milvus.grpc.FieldData fieldData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectget(int index, java.lang.String paramName)java.lang.BooleangetAsBool(int index, java.lang.String paramName)java.lang.DoublegetAsDouble(int index, java.lang.String paramName)java.lang.IntegergetAsInt(int index, java.lang.String paramName)java.lang.StringgetAsString(int index, java.lang.String paramName)intgetDim()Gets the dimension value of a vector field.java.util.List<?>getFieldData()Returns the field data according to its type: float vector field return List of List Float, binary vector field return List of ByteBuffer int64 field return List of Long int32/int16/int8 field return List of Integer boolean field return List of Boolean float field return List of Float double field return List of Double varchar field return List of String etc.longgetRowCount()Gets the row count of a field.booleanisDynamicField()booleanisJsonField()booleanisVectorField()java.lang.ObjectvalueByIdx(int index)
-
-
-
Method Detail
-
isVectorField
public boolean isVectorField()
-
isJsonField
public boolean isJsonField()
-
isDynamicField
public boolean isDynamicField()
-
getDim
public int getDim() throws IllegalResponseExceptionGets the dimension value of a vector field. ThrowIllegalResponseExceptionif the field is not a vector filed.- Returns:
intdimension of the vector field- Throws:
IllegalResponseException
-
getRowCount
public long getRowCount() throws IllegalResponseExceptionGets the row count of a field. * ThrowsIllegalResponseExceptionif the field type is illegal.- Returns:
longrow count of the field- Throws:
IllegalResponseException
-
getFieldData
public java.util.List<?> getFieldData() throws IllegalResponseExceptionReturns the field data according to its type: float vector field return List of List Float, binary vector field return List of ByteBuffer int64 field return List of Long int32/int16/int8 field return List of Integer boolean field return List of Boolean float field return List of Float double field return List of Double varchar field return List of String etc. ThrowsIllegalResponseExceptionif the field type is illegal.- Returns:
List- Throws:
IllegalResponseException
-
getAsInt
public java.lang.Integer getAsInt(int index, java.lang.String paramName) throws IllegalResponseException- Throws:
IllegalResponseException
-
getAsString
public java.lang.String getAsString(int index, java.lang.String paramName) throws IllegalResponseException- Throws:
IllegalResponseException
-
getAsBool
public java.lang.Boolean getAsBool(int index, java.lang.String paramName) throws IllegalResponseException- Throws:
IllegalResponseException
-
getAsDouble
public java.lang.Double getAsDouble(int index, java.lang.String paramName) throws IllegalResponseException- Throws:
IllegalResponseException
-
get
public java.lang.Object get(int index, java.lang.String paramName) throws IllegalResponseException- Throws:
IllegalResponseException
-
valueByIdx
public java.lang.Object valueByIdx(int index) throws ParamException- Throws:
ParamException
-
-