From 47c12881f3e068e4d7c8dc5350a8bd9b3fd5844c Mon Sep 17 00:00:00 2001 From: Abdon Pijpelink Date: Tue, 25 Nov 2025 18:04:03 +0100 Subject: [PATCH 1/4] Update base docker images (#94) --- example/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/Dockerfile b/example/Dockerfile index c9e3578..46bad08 100644 --- a/example/Dockerfile +++ b/example/Dockerfile @@ -1,5 +1,5 @@ # Use OpenJDK 11 as base image -FROM openjdk:11-jdk-slim AS build +FROM eclipse-temurin:11-jdk AS build # Set working directory WORKDIR /app @@ -24,7 +24,7 @@ COPY . . RUN gradle --no-daemon clean shadowJar # Create a runtime image -FROM openjdk:11-jre-slim +FROM eclipse-temurin:11-jre WORKDIR /app From a2383547978855f58e1a7a26337152463a2c7f51 Mon Sep 17 00:00:00 2001 From: tellet-q <166374656+tellet-q@users.noreply.github.com> Date: Thu, 11 Dec 2025 17:31:26 +0100 Subject: [PATCH 2/4] Move version compatibility check until after api key obtained (#97) --- .../java/io/qdrant/client/QdrantGrpcClient.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/main/java/io/qdrant/client/QdrantGrpcClient.java b/src/main/java/io/qdrant/client/QdrantGrpcClient.java index e0ecf75..3e0364c 100644 --- a/src/main/java/io/qdrant/client/QdrantGrpcClient.java +++ b/src/main/java/io/qdrant/client/QdrantGrpcClient.java @@ -192,16 +192,14 @@ public void close() { public static class Builder { private final ManagedChannel channel; private final boolean shutdownChannelOnClose; + private final boolean checkCompatibility; @Nullable private CallCredentials callCredentials; @Nullable private Duration timeout; Builder(ManagedChannel channel, boolean shutdownChannelOnClose, boolean checkCompatibility) { this.channel = channel; this.shutdownChannelOnClose = shutdownChannelOnClose; - String clientVersion = Builder.class.getPackage().getImplementationVersion(); - if (checkCompatibility) { - checkVersionsCompatibility(clientVersion); - } + this.checkCompatibility = checkCompatibility; } Builder(String host, int port, boolean useTransportLayerSecurity, boolean checkCompatibility) { @@ -210,9 +208,7 @@ public static class Builder { String userAgent = "java-client/" + clientVersion + " java/" + javaVersion; this.channel = createChannel(host, port, useTransportLayerSecurity, userAgent); this.shutdownChannelOnClose = true; - if (checkCompatibility) { - checkVersionsCompatibility(clientVersion); - } + this.checkCompatibility = checkCompatibility; } /** @@ -255,6 +251,10 @@ public Builder withCallCredentials(@Nullable CallCredentials callCredentials) { * @return a new instance of {@link QdrantGrpcClient} */ public QdrantGrpcClient build() { + if (checkCompatibility) { + String clientVersion = Builder.class.getPackage().getImplementationVersion(); + checkVersionsCompatibility(clientVersion); + } return new QdrantGrpcClient(channel, shutdownChannelOnClose, callCredentials, timeout); } @@ -277,6 +277,7 @@ private void checkVersionsCompatibility(String clientVersion) { try { String serverVersion = QdrantGrpc.newBlockingStub(this.channel) + .withCallCredentials(this.callCredentials) .healthCheck(QdrantOuterClass.HealthCheckRequest.getDefaultInstance()) .getVersion(); if (!VersionsCompatibilityChecker.isCompatible(clientVersion, serverVersion)) { From 8a3a8e044e84347f1668494ccfa418a5d387c09a Mon Sep 17 00:00:00 2001 From: Anush Date: Tue, 16 Dec 2025 17:51:51 +0530 Subject: [PATCH 3/4] chore: Update gRPC and Protoc versions to 1.75.0 and 3.25.5 (#100) * chore: Update gRPC and Protoc versions to 1.75.0 and 3.25.5 Signed-off-by: Anush008 * chore: Bump package version Signed-off-by: Anush008 --------- Signed-off-by: Anush008 --- README.md | 6 +++--- build.gradle | 4 ++-- example/build.gradle | 2 +- gradle.properties | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 0e46d89..1d7cfde 100644 --- a/README.md +++ b/README.md @@ -38,20 +38,20 @@ To install the library, add the following lines to your build config file. io.qdrant client - 1.16.1 + 1.16.2 ``` #### SBT ```sbt -libraryDependencies += "io.qdrant" % "client" % "1.16.1" +libraryDependencies += "io.qdrant" % "client" % "1.16.2" ``` #### Gradle ```gradle -implementation 'io.qdrant:client:1.16.1' +implementation 'io.qdrant:client:1.16.2' ``` > [!NOTE] diff --git a/build.gradle b/build.gradle index ec75730..5958f54 100644 --- a/build.gradle +++ b/build.gradle @@ -79,8 +79,8 @@ jar { } } -def grpcVersion = '1.68.2' -def protocVersion = '3.25.4' +def grpcVersion = '1.75.0' +def protocVersion = '3.25.5' def slf4jVersion = '2.0.14' def testcontainersVersion = '1.20.1' def jUnitVersion = '5.10.2' diff --git a/example/build.gradle b/example/build.gradle index e79263a..9466132 100644 --- a/example/build.gradle +++ b/example/build.gradle @@ -13,7 +13,7 @@ repositories { dependencies { // Qdrant Java client - implementation 'io.qdrant:client:1.16.1' + implementation 'io.qdrant:client:1.16.2' // gRPC dependencies - use the same version as Qdrant client implementation 'io.grpc:grpc-netty-shaded:1.65.1' diff --git a/gradle.properties b/gradle.properties index e760cbf..a8c3f78 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,8 +1,8 @@ # The version of qdrant to use to download protos -qdrantProtosVersion=v1.16.0 +qdrantProtosVersion=v1.16.2 # The version of qdrant docker image to run integration tests against -qdrantVersion=v1.16.0 +qdrantVersion=v1.16.2 # The version of the client to generate -packageVersion=1.16.1 +packageVersion=1.16.2 From 7da399158cfd2ce047ced728c4a2fbc4e2edcb1d Mon Sep 17 00:00:00 2001 From: Anush Date: Thu, 19 Feb 2026 22:12:04 +0530 Subject: [PATCH 4/4] v1.17.0 (#105) * v1.17.0 Signed-off-by: Anush008 * chore: Bump to v1.17.0 Signed-off-by: Anush008 * docs: Updated README.md Signed-off-by: Anush008 * fix: Use https://github.com/testcontainers/testcontainers-java/issues/10788#issuecomment-3921564794 Signed-off-by: Anush008 --------- Signed-off-by: Anush008 --- .github/workflows/cd.yml | 6 ++++ .github/workflows/test.yml | 3 ++ README.md | 6 ++-- example/build.gradle | 2 +- gradle.properties | 6 ++-- .../java/io/qdrant/client/QdrantClient.java | 34 +++++++++++++++++++ .../java/io/qdrant/client/QueryFactory.java | 11 ++++++ 7 files changed, 61 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index e847808..1c8b2ac 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -25,6 +25,9 @@ jobs: java-version: '17' distribution: 'temurin' + - name: Set Docker API version + run: echo "api.version=1.44" > $HOME/.docker-java.properties + - name: Build uses: gradle/gradle-build-action@v2 with: @@ -70,6 +73,9 @@ jobs: java-version: '17' distribution: 'temurin' + - name: Set Docker API version + run: echo "api.version=1.44" > $HOME/.docker-java.properties + - name: Publish package uses: gradle/gradle-build-action@v2 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ccba4a4..8cd8238 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,6 +27,9 @@ jobs: java-version: '17' distribution: 'temurin' + - name: Set Docker API version + run: echo "api.version=1.44" > $HOME/.docker-java.properties + - name: Build uses: gradle/gradle-build-action@v2 with: diff --git a/README.md b/README.md index 1d7cfde..ecf02a6 100644 --- a/README.md +++ b/README.md @@ -38,20 +38,20 @@ To install the library, add the following lines to your build config file. io.qdrant client - 1.16.2 + 1.17.0 ``` #### SBT ```sbt -libraryDependencies += "io.qdrant" % "client" % "1.16.2" +libraryDependencies += "io.qdrant" % "client" % "1.17.0" ``` #### Gradle ```gradle -implementation 'io.qdrant:client:1.16.2' +implementation 'io.qdrant:client:1.17.0' ``` > [!NOTE] diff --git a/example/build.gradle b/example/build.gradle index 9466132..b275488 100644 --- a/example/build.gradle +++ b/example/build.gradle @@ -13,7 +13,7 @@ repositories { dependencies { // Qdrant Java client - implementation 'io.qdrant:client:1.16.2' + implementation 'io.qdrant:client:1.17.0' // gRPC dependencies - use the same version as Qdrant client implementation 'io.grpc:grpc-netty-shaded:1.65.1' diff --git a/gradle.properties b/gradle.properties index a8c3f78..3d3e8ab 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,8 +1,8 @@ # The version of qdrant to use to download protos -qdrantProtosVersion=v1.16.2 +qdrantProtosVersion=v1.17.0 # The version of qdrant docker image to run integration tests against -qdrantVersion=v1.16.2 +qdrantVersion=v1.17.0 # The version of the client to generate -packageVersion=1.16.2 +packageVersion=1.17.0 diff --git a/src/main/java/io/qdrant/client/QdrantClient.java b/src/main/java/io/qdrant/client/QdrantClient.java index 717e798..42edf51 100644 --- a/src/main/java/io/qdrant/client/QdrantClient.java +++ b/src/main/java/io/qdrant/client/QdrantClient.java @@ -32,10 +32,13 @@ import io.qdrant.client.grpc.Collections.ListCollectionAliasesRequest; import io.qdrant.client.grpc.Collections.ListCollectionsRequest; import io.qdrant.client.grpc.Collections.ListCollectionsResponse; +import io.qdrant.client.grpc.Collections.ListShardKeysRequest; +import io.qdrant.client.grpc.Collections.ListShardKeysResponse; import io.qdrant.client.grpc.Collections.PayloadIndexParams; import io.qdrant.client.grpc.Collections.PayloadSchemaType; import io.qdrant.client.grpc.Collections.RenameAlias; import io.qdrant.client.grpc.Collections.ShardKey; +import io.qdrant.client.grpc.Collections.ShardKeyDescription; import io.qdrant.client.grpc.Collections.UpdateCollection; import io.qdrant.client.grpc.Collections.UpdateCollectionClusterSetupRequest; import io.qdrant.client.grpc.Collections.UpdateCollectionClusterSetupResponse; @@ -926,6 +929,37 @@ public ListenableFuture deleteShardKeyAsync( MoreExecutors.directExecutor()); } + /** + * List the shard keys of a collection. + * + * @param collectionName The name of the collection to list shard keys for. + * @return a new instance of {@link ListenableFuture} + */ + public ListenableFuture> listShardKeysAsync(String collectionName) { + return listShardKeysAsync(collectionName, null); + } + + /** + * List the shard keys of a collection. + * + * @param collectionName The name of the collection to list shard keys for. + * @param timeout The timeout for the call. + * @return a new instance of {@link ListenableFuture} + */ + public ListenableFuture> listShardKeysAsync( + String collectionName, @Nullable Duration timeout) { + Preconditions.checkArgument(!collectionName.isEmpty(), "Collection name must not be empty"); + logger.debug("List shard keys for '{}'", collectionName); + + ListenableFuture future = + getCollections(timeout) + .listShardKeys( + ListShardKeysRequest.newBuilder().setCollectionName(collectionName).build()); + addLogFailureCallback(future, "List Shard Keys"); + return Futures.transform( + future, response -> response.getShardKeysList(), MoreExecutors.directExecutor()); + } + // endregion // region Point Management diff --git a/src/main/java/io/qdrant/client/QueryFactory.java b/src/main/java/io/qdrant/client/QueryFactory.java index 40a283c..12d5f0d 100644 --- a/src/main/java/io/qdrant/client/QueryFactory.java +++ b/src/main/java/io/qdrant/client/QueryFactory.java @@ -16,6 +16,7 @@ import io.qdrant.client.grpc.Points.OrderBy; import io.qdrant.client.grpc.Points.Query; import io.qdrant.client.grpc.Points.RecommendInput; +import io.qdrant.client.grpc.Points.RelevanceFeedbackInput; import io.qdrant.client.grpc.Points.Rrf; import io.qdrant.client.grpc.Points.Sample; import io.qdrant.client.grpc.Points.VectorInput; @@ -253,5 +254,15 @@ public static Query sample(Sample sample) { return Query.newBuilder().setSample(sample).build(); } + /** + * Creates a {@link Query} for search with feedback from some oracle. + * + * @param relevanceFeedback An instance of {@link RelevanceFeedbackInput} + * @return A new instance of {@link Query} + */ + public static Query relevanceFeedback(RelevanceFeedbackInput relevanceFeedback) { + return Query.newBuilder().setRelevanceFeedback(relevanceFeedback).build(); + } + // endregion }