Interface SearchMethods

All Superinterfaces:
ClientSettings, io.metaloom.qdrant.client.CommonSettings
All Known Subinterfaces:
QDrantGRPCClient
All Known Implementing Classes:
AbstractQDrantGRPCClient, QDrantGRPCClientImpl

public interface SearchMethods extends ClientSettings
  • Method Details

    • searchPoints

      default GrpcClientRequest<Points.SearchResponse> searchPoints(String collectionName, float[] vector, long limit, Float scoreThreshold)
      Retrieve closest points based on vector similarity.
      Parameters:
      collectionName -
      vector -
      limit -
      scoreThreshold -
      Returns:
    • searchPoints

      default GrpcClientRequest<Points.SearchResponse> searchPoints(String collectionName, float[] vector, Points.Filter filter, Points.SearchParams params, long limit, Long offset, Points.WithPayloadSelector withPayloadSelector, Points.WithVectorsSelector withVectorsSelector, Float scoreThreshold)
      Retrieve closest points based on vector similarity and given filtering conditions.
      Parameters:
      collectionName - Name of the collection to search in
      vector - Vector data
      filter - Look only for points which satisfies this conditions
      params - Additional search params
      limit - Max number of result to return
      offset - Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.
      withPayloadSelector - Select which payload to return with the response. Default: None
      withVectorsSelector - Whether to return the point vector with the result.
      scoreThreshold - Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.
      Returns:
    • searchBatch

      default GrpcClientRequest<Points.SearchBatchResponse> searchBatch(String collectionName, List<? extends Points.SearchPoints> searches)
      Retrieve by batch the closest points based on vector similarity and given filtering conditions.
      Parameters:
      collectionName - Name of the collection to search in
      searches - List of search batches
      Returns:
    • recommendPoints

      default GrpcClientRequest<Points.RecommendResponse> recommendPoints(String collectionName, List<Points.PointId> positives, int limit)
      Look for the points which are closer to stored positive examples and at the same time further to negative examples.
      Parameters:
      collectionName - Name of the collection to search in
      positives - Look for vectors closest to those
      limit - Max number of result to return
      Returns:
    • recommendPoints

      default GrpcClientRequest<Points.RecommendResponse> recommendPoints(String collectionName, List<Points.PointId> positives, int limit, String using)
      Look for the points which are closer to stored positive examples.
      Parameters:
      collectionName -
      positives -
      limit -
      using -
      Returns:
    • recommendPoints

      default GrpcClientRequest<Points.RecommendResponse> recommendPoints(String collectionName, List<Points.PointId> positives, List<Points.PointId> negatives, Points.Filter filter, Points.SearchParams params, int limit, Integer offset, Points.WithPayloadSelector withPayload, Points.WithVectorsSelector withVector, Float scoreThreshold, String using, Points.LookupLocation lookupFrom)
      Look for the points which are closer to stored positive examples and at the same time further to negative examples.
      Parameters:
      collectionName - Name of the collection to search in
      positives - Look for vectors closest to those
      negatives - Try to avoid vectors like this
      filter - Look only for points which satisfies this conditions
      params - Additional search params
      limit - Max number of result to return
      offset - Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.
      withPayload - Select which payload to return with the response. Default: None
      withVector - Whether to return the point vector with the result.
      scoreThreshold - Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.
      using - Define which vector to use for recommendation, if not specified - try to use default vector
      lookupFrom - The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection
      Returns:
    • recommendBatchPoints

      default GrpcClientRequest<Points.RecommendBatchResponse> recommendBatchPoints(String collectionName, List<? extends Points.RecommendPoints> searches)
      Look for the points which are closer to stored positive examples and at the same time further to negative examples.
      Parameters:
      collectionName - Name of the collection to search in
      searches - Request points based on positive and negative examples.
      Returns: