diff --git a/src/main/java/io/qdrant/client/QdrantClient.java b/src/main/java/io/qdrant/client/QdrantClient.java index 615a216..1d59206 100644 --- a/src/main/java/io/qdrant/client/QdrantClient.java +++ b/src/main/java/io/qdrant/client/QdrantClient.java @@ -2257,13 +2257,16 @@ public ListenableFuture batchUpdateAsync( * * @return a new instance of {@link ListenableFuture} */ - public ListenableFuture batchUpdateAsync(UpdateBatchPoints request, @Nullable Duration timeout) { + public ListenableFuture> batchUpdateAsync(UpdateBatchPoints request, @Nullable Duration timeout) { String collectionName = request.getCollectionName(); Preconditions.checkArgument(!collectionName.isEmpty(), "Collection name must not be empty"); logger.debug("Batch update points on '{}'", collectionName); ListenableFuture future = getPoints(timeout).updateBatch(request); addLogFailureCallback(future, "Batch update points"); - return future; + return Futures.transform( + future, + UpdateBatchResponse::getResultList, + MoreExecutors.directExecutor()); } /** diff --git a/src/main/java/io/qdrant/client/VectorsFactory.java b/src/main/java/io/qdrant/client/VectorsFactory.java index daf7489..bd3e285 100644 --- a/src/main/java/io/qdrant/client/VectorsFactory.java +++ b/src/main/java/io/qdrant/client/VectorsFactory.java @@ -25,7 +25,7 @@ private VectorsFactory() { public static Vectors namedVectors(Map values) { return Vectors.newBuilder() .setVectors(NamedVectors.newBuilder() - .putAllVectors(Maps.transformValues(values, v -> v)) + .putAllVectors(values) ) .build(); }