public class FieldDataWrapper
extends java.lang.Object
query/search
interface.Constructor and Description |
---|
FieldDataWrapper(@NonNull io.milvus.grpc.FieldData fieldData) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
get(int index,
java.lang.String paramName)
Gets a field's value by field name.
|
java.lang.Boolean |
getAsBool(int index,
java.lang.String paramName) |
java.lang.Double |
getAsDouble(int index,
java.lang.String paramName) |
java.lang.Integer |
getAsInt(int index,
java.lang.String paramName) |
java.lang.String |
getAsString(int index,
java.lang.String paramName) |
int |
getDim()
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
array field return List of List
etc.
|
long |
getRowCount()
Gets the row count of a field.
|
boolean |
isDynamicField() |
boolean |
isJsonField() |
boolean |
isVectorField() |
static com.google.gson.JsonElement |
ParseJSONObject(java.lang.Object object) |
java.lang.Object |
valueByIdx(int index) |
static java.lang.Object |
ValueOfJSONElement(com.google.gson.JsonElement element) |
public FieldDataWrapper(@NonNull @NonNull io.milvus.grpc.FieldData fieldData)
public boolean isVectorField()
public boolean isJsonField()
public boolean isDynamicField()
public int getDim() throws IllegalResponseException
IllegalResponseException
if the field is not a vector filed.int
dimension of the vector fieldIllegalResponseException
public long getRowCount() throws IllegalResponseException
IllegalResponseException
if the field type is illegal.long
row count of the fieldIllegalResponseException
public java.util.List<?> getFieldData() throws IllegalResponseException
IllegalResponseException
if the field type is illegal.List
IllegalResponseException
public java.lang.Integer getAsInt(int index, java.lang.String paramName) throws IllegalResponseException
IllegalResponseException
public java.lang.String getAsString(int index, java.lang.String paramName) throws IllegalResponseException
IllegalResponseException
public java.lang.Boolean getAsBool(int index, java.lang.String paramName) throws IllegalResponseException
IllegalResponseException
public java.lang.Double getAsDouble(int index, java.lang.String paramName) throws IllegalResponseException
IllegalResponseException
public java.lang.Object get(int index, java.lang.String paramName) throws IllegalResponseException
index
- which rowparamName
- which fieldIllegalResponseException
public java.lang.Object valueByIdx(int index) throws ParamException
ParamException
public static com.google.gson.JsonElement ParseJSONObject(java.lang.Object object)
public static java.lang.Object ValueOfJSONElement(com.google.gson.JsonElement element)