Package io.milvus.response
Class FieldDataWrapper
java.lang.Object
io.milvus.response.FieldDataWrapper
Utility class to wrap response of
query/search interface.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets a field's value by field name.getAsDouble(int index, String paramName) getAsString(int index, String paramName) intgetDim()Gets the dimension value of a vector field.List<?> 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 array field return List of List etc.longGets the row count of a field.booleanbooleanbooleanstatic com.google.gson.JsonElementParseJSONObject(Object object) valueByIdx(int index) static ObjectValueOfJSONElement(com.google.gson.JsonElement element)
-
Constructor Details
-
FieldDataWrapper
-
-
Method Details
-
isVectorField
public boolean isVectorField() -
isJsonField
public boolean isJsonField() -
isDynamicField
public boolean isDynamicField() -
getDim
Gets the dimension value of a vector field. ThrowIllegalResponseExceptionif the field is not a vector filed.- Returns:
intdimension of the vector field- Throws:
IllegalResponseException
-
getRowCount
Gets the row count of a field. * ThrowsIllegalResponseExceptionif the field type is illegal.- Returns:
longrow count of the field- Throws:
IllegalResponseException
-
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 array field return List of List etc. ThrowsIllegalResponseExceptionif the field type is illegal.- Returns:
List- Throws:
IllegalResponseException
-
getAsInt
- Throws:
IllegalResponseException
-
getAsString
- Throws:
IllegalResponseException
-
getAsBool
- Throws:
IllegalResponseException
-
getAsDouble
- Throws:
IllegalResponseException
-
get
Gets a field's value by field name.- Parameters:
index- which rowparamName- which field- Returns:
- returns Long for integer value, returns Double for decimal value, returns String for string value, returns JsonElement for JSON object and Array.
- Throws:
IllegalResponseException
-
valueByIdx
- Throws:
ParamException
-
ParseJSONObject
-
ValueOfJSONElement
-