|
55 | 55 | import io.qdrant.client.grpc.Points.CountPoints; |
56 | 56 | import io.qdrant.client.grpc.Points.CountResponse; |
57 | 57 | import io.qdrant.client.grpc.Points.CreateFieldIndexCollection; |
| 58 | +import io.qdrant.client.grpc.Points.CreateVectorNameRequest; |
58 | 59 | import io.qdrant.client.grpc.Points.DeleteFieldIndexCollection; |
59 | 60 | import io.qdrant.client.grpc.Points.DeletePayloadPoints; |
60 | 61 | import io.qdrant.client.grpc.Points.DeletePointVectors; |
61 | 62 | import io.qdrant.client.grpc.Points.DeletePoints; |
| 63 | +import io.qdrant.client.grpc.Points.DeleteVectorNameRequest; |
62 | 64 | import io.qdrant.client.grpc.Points.DiscoverBatchPoints; |
63 | 65 | import io.qdrant.client.grpc.Points.DiscoverBatchResponse; |
64 | 66 | import io.qdrant.client.grpc.Points.DiscoverPoints; |
@@ -2348,6 +2350,60 @@ public ListenableFuture<UpdateResult> deletePayloadIndexAsync( |
2348 | 2350 | future, PointsOperationResponse::getResult, MoreExecutors.directExecutor()); |
2349 | 2351 | } |
2350 | 2352 |
|
| 2353 | + /** |
| 2354 | + * Creates a new named vector on a collection. |
| 2355 | + * |
| 2356 | + * @param request The create vector name request. |
| 2357 | + * @return a new instance of {@link ListenableFuture} |
| 2358 | + */ |
| 2359 | + public ListenableFuture<UpdateResult> createVectorNameAsync(CreateVectorNameRequest request) { |
| 2360 | + return createVectorNameAsync(request, null); |
| 2361 | + } |
| 2362 | + |
| 2363 | + /** |
| 2364 | + * Creates a new named vector on a collection. |
| 2365 | + * |
| 2366 | + * @param request The create vector name request. |
| 2367 | + * @param timeout The timeout for the call. |
| 2368 | + * @return a new instance of {@link ListenableFuture} |
| 2369 | + */ |
| 2370 | + public ListenableFuture<UpdateResult> createVectorNameAsync( |
| 2371 | + CreateVectorNameRequest request, @Nullable Duration timeout) { |
| 2372 | + logger.debug( |
| 2373 | + "Create vector name '{}' in '{}'", request.getVectorName(), request.getCollectionName()); |
| 2374 | + ListenableFuture<PointsOperationResponse> future = getPoints(timeout).createVectorName(request); |
| 2375 | + addLogFailureCallback(future, "Create vector name"); |
| 2376 | + return Futures.transform( |
| 2377 | + future, PointsOperationResponse::getResult, MoreExecutors.directExecutor()); |
| 2378 | + } |
| 2379 | + |
| 2380 | + /** |
| 2381 | + * Deletes a named vector from a collection. |
| 2382 | + * |
| 2383 | + * @param request The delete vector name request. |
| 2384 | + * @return a new instance of {@link ListenableFuture} |
| 2385 | + */ |
| 2386 | + public ListenableFuture<UpdateResult> deleteVectorNameAsync(DeleteVectorNameRequest request) { |
| 2387 | + return deleteVectorNameAsync(request, null); |
| 2388 | + } |
| 2389 | + |
| 2390 | + /** |
| 2391 | + * Deletes a named vector from a collection. |
| 2392 | + * |
| 2393 | + * @param request The delete vector name request. |
| 2394 | + * @param timeout The timeout for the call. |
| 2395 | + * @return a new instance of {@link ListenableFuture} |
| 2396 | + */ |
| 2397 | + public ListenableFuture<UpdateResult> deleteVectorNameAsync( |
| 2398 | + DeleteVectorNameRequest request, @Nullable Duration timeout) { |
| 2399 | + logger.debug( |
| 2400 | + "Delete vector name '{}' in '{}'", request.getVectorName(), request.getCollectionName()); |
| 2401 | + ListenableFuture<PointsOperationResponse> future = getPoints(timeout).deleteVectorName(request); |
| 2402 | + addLogFailureCallback(future, "Delete vector name"); |
| 2403 | + return Futures.transform( |
| 2404 | + future, PointsOperationResponse::getResult, MoreExecutors.directExecutor()); |
| 2405 | + } |
| 2406 | + |
2351 | 2407 | /** |
2352 | 2408 | * Retrieves closest points based on vector similarity and the given filtering conditions. |
2353 | 2409 | * |
|
0 commit comments