Package io.milvus.response
Class SearchResultsWrapper
java.lang.Object
io.milvus.response.basic.RowRecordWrapper
io.milvus.response.SearchResultsWrapper
Utility class to wrap response of
search interface.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classInternal-use class to wrap response ofsearchinterface. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<?> getFieldData(@NonNull String fieldName, int indexOfTarget) Gets data for an output field which is specified by search request.getFieldWrapper(@NonNull String fieldName) GetsFieldDataWrapperfor a field.getIDScore(int indexOfTarget) Gets ID-score pairs returned by search interface.Deprecated.getRowRecords(int indexOfTarget) Note: this method's function is duplicated with getIDScore(), it is for high-level search.Methods inherited from class io.milvus.response.basic.RowRecordWrapper
buildRowRecord, getDynamicWrapper, getFieldWrapperInternal
-
Constructor Details
-
SearchResultsWrapper
-
-
Method Details
-
getFieldWrapper
GetsFieldDataWrapperfor a field. ThrowsParamExceptionif the field doesn't exist.- Parameters:
fieldName- field name to get output data- Returns:
FieldDataWrapper- Throws:
ParamException
-
getRowRecords
Deprecated.Note: this method only can return the first target vector's topk result and its function is duplicated with getIDScore(), so we mark it as deprecated.- Specified by:
getRowRecordsin classRowRecordWrapper
-
getRowRecords
Note: this method's function is duplicated with getIDScore(), it is for high-level search.- Parameters:
indexOfTarget- index of a row- Returns:
- List of
QueryResultsWrapper.RowRecord
-
getFieldDataList
- Specified by:
getFieldDataListin classRowRecordWrapper
-
getOutputFields
- Specified by:
getOutputFieldsin classRowRecordWrapper
-
getFieldData
Gets data for an output field which is specified by search request. ThrowsParamExceptionif the field doesn't exist. ThrowsParamExceptionif the indexOfTarget is illegal.- Parameters:
fieldName- field name to get output dataindexOfTarget- which target vector the field data belongs to- Returns:
FieldDataWrapper
-
getIDScore
public List<SearchResultsWrapper.IDScore> getIDScore(int indexOfTarget) throws ParamException, IllegalResponseException Gets ID-score pairs returned by search interface. ThrowsParamExceptionif the indexOfTarget is illegal. ThrowsIllegalResponseExceptionif the returned results is illegal.- Parameters:
indexOfTarget- which target vector the result belongs to- Returns:
- List of IDScore, ID-score pairs returned by search interface
- Throws:
ParamExceptionIllegalResponseException
-