Class QueryFactory

java.lang.Object
io.qdrant.client.QueryFactory

public final class QueryFactory extends Object
Convenience methods for constructing Points.Query
  • Method Summary

    Modifier and Type
    Method
    Description
    static io.qdrant.client.grpc.Points.Query
    context(io.qdrant.client.grpc.Points.ContextInput input)
    Creates a Points.Query for context search.
    static io.qdrant.client.grpc.Points.Query
    discover(io.qdrant.client.grpc.Points.DiscoverInput input)
    Creates a Points.Query for discovery.
    static io.qdrant.client.grpc.Points.Query
    fusion(io.qdrant.client.grpc.Points.Fusion fusion)
    Creates a Points.Query for pre-fetch results fusion.
    static io.qdrant.client.grpc.Points.Query
    nearest(float... values)
    Creates a Points.Query from a list of floats
    static io.qdrant.client.grpc.Points.Query
    nearest(float[][] vectors)
    Creates a Points.Query from a nested array of floats representing a multi vector
    static io.qdrant.client.grpc.Points.Query
    nearest(long id)
    Creates a Points.Query from a long
    static io.qdrant.client.grpc.Points.Query
    nearest(io.qdrant.client.grpc.Points.PointId id)
    Creates a Points.Query from a Points.PointId
    static io.qdrant.client.grpc.Points.Query
    nearest(io.qdrant.client.grpc.Points.VectorInput input)
    Creates a Points.Query for nearest search.
    static io.qdrant.client.grpc.Points.Query
    nearest(List<Float> values)
    Creates a Points.Query from a list of floats
    static io.qdrant.client.grpc.Points.Query
    nearest(List<Float> values, List<Integer> indices)
    Creates a Points.Query from a list of floats and integers as indices
    static io.qdrant.client.grpc.Points.Query
    Creates a Points.Query from a UUID
    static io.qdrant.client.grpc.Points.Query
    Creates a Points.Query from a nested list of floats representing a multi vector
    static io.qdrant.client.grpc.Points.Query
    orderBy(io.qdrant.client.grpc.Points.OrderBy orderBy)
    Creates a Points.Query to order points by a payload field.
    static io.qdrant.client.grpc.Points.Query
    Creates a Points.Query to order points by a payload field.
    static io.qdrant.client.grpc.Points.Query
    recommend(io.qdrant.client.grpc.Points.RecommendInput input)
    Creates a Points.Query for recommendation.
    static io.qdrant.client.grpc.Points.Query
    sample(io.qdrant.client.grpc.Points.Sample sample)
    Creates a Points.Query for sampling.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • recommend

      public static io.qdrant.client.grpc.Points.Query recommend(io.qdrant.client.grpc.Points.RecommendInput input)
      Creates a Points.Query for recommendation.
      Parameters:
      input - An instance of Points.RecommendInput
      Returns:
      a new instance of Points.Query
    • discover

      public static io.qdrant.client.grpc.Points.Query discover(io.qdrant.client.grpc.Points.DiscoverInput input)
      Creates a Points.Query for discovery.
      Parameters:
      input - An instance of Points.DiscoverInput
      Returns:
      a new instance of Points.Query
    • context

      public static io.qdrant.client.grpc.Points.Query context(io.qdrant.client.grpc.Points.ContextInput input)
      Creates a Points.Query for context search.
      Parameters:
      input - An instance of Points.ContextInput
      Returns:
      a new instance of Points.Query
    • fusion

      public static io.qdrant.client.grpc.Points.Query fusion(io.qdrant.client.grpc.Points.Fusion fusion)
      Creates a Points.Query for pre-fetch results fusion.
      Parameters:
      fusion - An instance of Points.Fusion
      Returns:
      a new instance of Points.Query
    • orderBy

      public static io.qdrant.client.grpc.Points.Query orderBy(String key)
      Creates a Points.Query to order points by a payload field.
      Parameters:
      key - Name of the payload field to order by
      Returns:
      a new instance of Points.Query
    • orderBy

      public static io.qdrant.client.grpc.Points.Query orderBy(io.qdrant.client.grpc.Points.OrderBy orderBy)
      Creates a Points.Query to order points by a payload field.
      Parameters:
      orderBy - An instance of Points.OrderBy
      Returns:
      a new instance of Points.Query
    • nearest

      public static io.qdrant.client.grpc.Points.Query nearest(io.qdrant.client.grpc.Points.VectorInput input)
      Creates a Points.Query for nearest search.
      Parameters:
      input - An instance of Points.VectorInput
      Returns:
      a new instance of Points.Query
    • nearest

      public static io.qdrant.client.grpc.Points.Query nearest(List<Float> values)
      Creates a Points.Query from a list of floats
      Parameters:
      values - A map of vector names to values
      Returns:
      A new instance of Points.Query
    • nearest

      public static io.qdrant.client.grpc.Points.Query nearest(float... values)
      Creates a Points.Query from a list of floats
      Parameters:
      values - A list of values
      Returns:
      A new instance of Points.Query
    • nearest

      public static io.qdrant.client.grpc.Points.Query nearest(List<Float> values, List<Integer> indices)
      Creates a Points.Query from a list of floats and integers as indices
      Parameters:
      values - The list of floats representing the vector.
      indices - The list of integers representing the indices.
      Returns:
      A new instance of Points.Query
    • nearest

      public static io.qdrant.client.grpc.Points.Query nearest(float[][] vectors)
      Creates a Points.Query from a nested array of floats representing a multi vector
      Parameters:
      vectors - The nested array of floats.
      Returns:
      A new instance of Points.Query
    • nearest

      public static io.qdrant.client.grpc.Points.Query nearest(long id)
      Creates a Points.Query from a long
      Parameters:
      id - The point id
      Returns:
      a new instance of Points.Query
    • nearest

      public static io.qdrant.client.grpc.Points.Query nearest(UUID id)
      Creates a Points.Query from a UUID
      Parameters:
      id - The pint id
      Returns:
      a new instance of Points.Query
    • nearest

      public static io.qdrant.client.grpc.Points.Query nearest(io.qdrant.client.grpc.Points.PointId id)
      Creates a Points.Query from a Points.PointId
      Parameters:
      id - The pint id
      Returns:
      a new instance of Points.Query
    • nearestMultiVector

      public static io.qdrant.client.grpc.Points.Query nearestMultiVector(List<List<Float>> vectors)
      Creates a Points.Query from a nested list of floats representing a multi vector
      Parameters:
      vectors - The nested list of floats.
      Returns:
      A new instance of Points.Query
    • sample

      public static io.qdrant.client.grpc.Points.Query sample(io.qdrant.client.grpc.Points.Sample sample)
      Creates a Points.Query for sampling.
      Parameters:
      sample - An instance of Points.Sample
      Returns:
      A new instance of Points.Query