Package io.qdrant.client
Class QueryFactory
java.lang.Object
io.qdrant.client.QueryFactory
Convenience methods for constructing
Points.Query-
Method Summary
Modifier and TypeMethodDescriptionstatic io.qdrant.client.grpc.Points.Querycontext(io.qdrant.client.grpc.Points.ContextInput input) Creates aPoints.Queryfor context search.static io.qdrant.client.grpc.Points.Querydiscover(io.qdrant.client.grpc.Points.DiscoverInput input) Creates aPoints.Queryfor discovery.static io.qdrant.client.grpc.Points.Queryformula(io.qdrant.client.grpc.Points.Formula formula) Creates aPoints.Queryfor score boosting using an arbitrary formula.static io.qdrant.client.grpc.Points.Queryfusion(io.qdrant.client.grpc.Points.Fusion fusion) Creates aPoints.Queryfor pre-fetch results fusion.static io.qdrant.client.grpc.Points.Querynearest(float... values) Creates aPoints.Queryfrom a list of floatsstatic io.qdrant.client.grpc.Points.Querynearest(float[][] vectors) Creates aPoints.Queryfrom a nested array of floats representing a multi vectorstatic io.qdrant.client.grpc.Points.Querynearest(long id) Creates aPoints.Queryfrom alongstatic io.qdrant.client.grpc.Points.Querynearest(io.qdrant.client.grpc.Common.PointId id) Creates aPoints.Queryfrom aCommon.PointIdstatic io.qdrant.client.grpc.Points.Querynearest(io.qdrant.client.grpc.Points.Document document) Creates aPoints.Queryfrom aPoints.Documentstatic io.qdrant.client.grpc.Points.Querynearest(io.qdrant.client.grpc.Points.Image image) Creates aPoints.Queryfrom an image for cloud inference.static io.qdrant.client.grpc.Points.Querynearest(io.qdrant.client.grpc.Points.InferenceObject object) Creates aPoints.Queryfrom anPoints.InferenceObjectstatic io.qdrant.client.grpc.Points.Querynearest(io.qdrant.client.grpc.Points.VectorInput input) Creates aPoints.Queryfor nearest search.static io.qdrant.client.grpc.Points.Querynearest(io.qdrant.client.grpc.Points.VectorInput nearest, io.qdrant.client.grpc.Points.Mmr mmr) Creates aPoints.Queryfor re-ranking points with MMR (Maximum Marginal Relevance).static io.qdrant.client.grpc.Points.QueryCreates aPoints.Queryfrom a list of floatsstatic io.qdrant.client.grpc.Points.QueryCreates aPoints.Queryfrom a list of floats and integers as indicesstatic io.qdrant.client.grpc.Points.QueryCreates aPoints.Queryfrom aUUIDstatic io.qdrant.client.grpc.Points.QuerynearestMultiVector(List<List<Float>> vectors) Creates aPoints.Queryfrom a nested list of floats representing a multi vectorstatic io.qdrant.client.grpc.Points.QueryorderBy(io.qdrant.client.grpc.Points.OrderBy orderBy) Creates aPoints.Queryto order points by a payload field.static io.qdrant.client.grpc.Points.QueryCreates aPoints.Queryto order points by a payload field.static io.qdrant.client.grpc.Points.Queryrecommend(io.qdrant.client.grpc.Points.RecommendInput input) Creates aPoints.Queryfor recommendation.static io.qdrant.client.grpc.Points.Queryrrf(io.qdrant.client.grpc.Points.Rrf rrf) Creates aPoints.Queryfor reciprocal rank fusion (RRF).static io.qdrant.client.grpc.Points.Querysample(io.qdrant.client.grpc.Points.Sample sample) Creates aPoints.Queryfor sampling.
-
Method Details
-
recommend
public static io.qdrant.client.grpc.Points.Query recommend(io.qdrant.client.grpc.Points.RecommendInput input) Creates aPoints.Queryfor recommendation.- Parameters:
input- An instance ofPoints.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 aPoints.Queryfor discovery.- Parameters:
input- An instance ofPoints.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 aPoints.Queryfor context search.- Parameters:
input- An instance ofPoints.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 aPoints.Queryfor pre-fetch results fusion.- Parameters:
fusion- An instance ofPoints.Fusion- Returns:
- a new instance of
Points.Query
-
rrf
public static io.qdrant.client.grpc.Points.Query rrf(io.qdrant.client.grpc.Points.Rrf rrf) Creates aPoints.Queryfor reciprocal rank fusion (RRF).- Parameters:
rrf- An instance ofPoints.Rrf- Returns:
- a new instance of
Points.Query
-
orderBy
Creates aPoints.Queryto 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 aPoints.Queryto order points by a payload field.- Parameters:
orderBy- An instance ofPoints.OrderBy- Returns:
- a new instance of
Points.Query
-
formula
public static io.qdrant.client.grpc.Points.Query formula(io.qdrant.client.grpc.Points.Formula formula) Creates aPoints.Queryfor score boosting using an arbitrary formula.- Parameters:
formula- An instance ofPoints.Formula- 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 aPoints.Queryfor nearest search.- Parameters:
input- An instance ofPoints.VectorInput- Returns:
- a new instance of
Points.Query
-
nearest
Creates aPoints.Queryfrom 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 aPoints.Queryfrom a list of floats- Parameters:
values- A list of values- Returns:
- A new instance of
Points.Query
-
nearest
Creates aPoints.Queryfrom 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 aPoints.Queryfrom 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 aPoints.Queryfrom along- Parameters:
id- The point id- Returns:
- a new instance of
Points.Query
-
nearest
Creates aPoints.Queryfrom aUUID- Parameters:
id- The point id- Returns:
- a new instance of
Points.Query
-
nearest
public static io.qdrant.client.grpc.Points.Query nearest(io.qdrant.client.grpc.Common.PointId id) Creates aPoints.Queryfrom aCommon.PointId- Parameters:
id- The point id- Returns:
- a new instance of
Points.Query
-
nearest
public static io.qdrant.client.grpc.Points.Query nearest(io.qdrant.client.grpc.Points.Document document) Creates aPoints.Queryfrom aPoints.Document- Parameters:
document- The document to vectorize and query against.- Returns:
- a new instance of
Points.Query
-
nearest
public static io.qdrant.client.grpc.Points.Query nearest(io.qdrant.client.grpc.Points.Image image) Creates aPoints.Queryfrom an image for cloud inference.- Parameters:
image- The image to vectorize and query against.- Returns:
- a new instance of
Points.Query
-
nearest
public static io.qdrant.client.grpc.Points.Query nearest(io.qdrant.client.grpc.Points.InferenceObject object) Creates aPoints.Queryfrom anPoints.InferenceObject- Parameters:
object- The inference object to vectorize and query against.- Returns:
- a new instance of
Points.Query
-
nearest
public static io.qdrant.client.grpc.Points.Query nearest(io.qdrant.client.grpc.Points.VectorInput nearest, io.qdrant.client.grpc.Points.Mmr mmr) Creates aPoints.Queryfor re-ranking points with MMR (Maximum Marginal Relevance).- Parameters:
nearest- The vector input for nearest search.mmr- The MMR configuration.- Returns:
- a new instance of
Points.Query
-
nearestMultiVector
Creates aPoints.Queryfrom 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 aPoints.Queryfor sampling.- Parameters:
sample- An instance ofPoints.Sample- Returns:
- A new instance of
Points.Query
-