milvus-logo
Star
0
Forks
0
快速开始

Class SearchResultsWrapper

  • java.lang.Object
    • io.milvus.response.SearchResultsWrapper

  • public class SearchResultsWrapper
    extends java.lang.Object
    Utility class to wrap response of search interface.
    • Nested Class Summary

      Modifier and Type Class Description
      static class  SearchResultsWrapper.IDScore
      Internal-use class to wrap response of search interface.
    • Constructor Summary

      Constructor Description
      SearchResultsWrapper​(@NonNull io.milvus.grpc.SearchResultData results)  
    • Method Summary

      Modifier and Type Method Description
      java.util.List<?> getFieldData​(@NonNull java.lang.String fieldName, int indexOfTarget)
      Gets data for an output field which is specified by search request.
      java.util.List<SearchResultsWrapper.IDScore> getIDScore​(int indexOfTarget)
      Gets ID-score pairs returned by search interface.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SearchResultsWrapper

        public SearchResultsWrapper​(@NonNull
                                    @NonNull io.milvus.grpc.SearchResultData results)
    • Method Detail

      • getFieldData

        public java.util.List<?> getFieldData​(@NonNull
                                              @NonNull java.lang.String fieldName,
                                              int indexOfTarget)
        Gets data for an output field which is specified by search request. Throws ParamException if the field doesn't exist. Throws ParamException if the indexOfTarget is illegal.
        Parameters:
        fieldName - field name to get output data
        indexOfTarget - which target vector the field data belongs to
        Returns:
        FieldDataWrapper
      • getIDScore

        public java.util.List<SearchResultsWrapper.IDScore> getIDScore​(int indexOfTarget)
                                                                throws ParamException,
                                                                       IllegalResponseException
        Gets ID-score pairs returned by search interface. Throws ParamException if the indexOfTarget is illegal. Throws IllegalResponseException if the returned results is illegal.
        Parameters:
        indexOfTarget - which target vector the result belongs to
        Returns:
        List<IDScore> ID-score pairs returned by search interface
        Throws:
        ParamException
        IllegalResponseException