Skip to content

Commit

Permalink
queryBatchAsync(), vectors() overload
Browse files Browse the repository at this point in the history
  • Loading branch information
Anush008 committed Jun 28, 2024
1 parent 88216af commit 3fc7b4f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/main/java/io/qdrant/client/QdrantClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -2782,6 +2782,22 @@ public ListenableFuture<List<ScoredPoint>> queryAsync(QueryPoints request, @Null
return Futures.transform(future, QueryResponse::getResultList, MoreExecutors.directExecutor());
}

/**
* Universally query points in batch.
* Covers all capabilities of search, recommend, discover, filters.
* Also enables hybrid and multi-stage queries.
*
* @param collectionName The name of the collection
* @param queries The queries to be performed in the batch.
* @return a new instance of {@link ListenableFuture}
*/
public ListenableFuture<List<BatchResult>> queryBatchAsync(
String collectionName,
List<QueryPoints> queries
) {
return queryBatchAsync(collectionName, queries, null, null);
}

/**
* Universally query points in batch.
* Covers all capabilities of search, recommend, discover, filters.
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/io/qdrant/client/VectorsFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,15 @@ public static Vectors vectors(float... values) {
.setVector(vector(values))
.build();
}

/**
* Creates a vector
* @param values An instance of {@link Vector}
* @return a new instance of {@link Vectors}
*/
public static Vectors vectors(Vector vector) {
return Vectors.newBuilder()
.setVector(vector)
.build();
}
}

0 comments on commit 3fc7b4f

Please sign in to comment.