Skip to content

Commit af7f801

Browse files
committed
queryBatchAsync(), vectors() overload
1 parent 88216af commit af7f801

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

src/main/java/io/qdrant/client/QdrantClient.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2782,6 +2782,22 @@ public ListenableFuture<List<ScoredPoint>> queryAsync(QueryPoints request, @Null
27822782
return Futures.transform(future, QueryResponse::getResultList, MoreExecutors.directExecutor());
27832783
}
27842784

2785+
/**
2786+
* Universally query points in batch.
2787+
* Covers all capabilities of search, recommend, discover, filters.
2788+
* Also enables hybrid and multi-stage queries.
2789+
*
2790+
* @param collectionName The name of the collection
2791+
* @param queries The queries to be performed in the batch.
2792+
* @return a new instance of {@link ListenableFuture}
2793+
*/
2794+
public ListenableFuture<List<BatchResult>> queryBatchAsync(
2795+
String collectionName,
2796+
List<QueryPoints> queries
2797+
) {
2798+
return queryBatchAsync(collectionName, queries, null, null);
2799+
}
2800+
27852801
/**
27862802
* Universally query points in batch.
27872803
* Covers all capabilities of search, recommend, discover, filters.

src/main/java/io/qdrant/client/VectorsFactory.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,15 @@ public static Vectors vectors(float... values) {
5050
.setVector(vector(values))
5151
.build();
5252
}
53+
54+
/**
55+
* Creates a vector
56+
* @param vector An instance of {@link Vector}
57+
* @return a new instance of {@link Vectors}
58+
*/
59+
public static Vectors vectors(Vector vector) {
60+
return Vectors.newBuilder()
61+
.setVector(vector)
62+
.build();
63+
}
5364
}

0 commit comments

Comments
 (0)