Skip to content

Commit 7da3991

Browse files
authored
v1.17.0 (#105)
* v1.17.0 Signed-off-by: Anush008 <mail@anush.sh> * chore: Bump to v1.17.0 Signed-off-by: Anush008 <mail@anush.sh> * docs: Updated README.md Signed-off-by: Anush008 <mail@anush.sh> * fix: Use testcontainers/testcontainers-java#10788 (comment) Signed-off-by: Anush008 <mail@anush.sh> --------- Signed-off-by: Anush008 <mail@anush.sh>
1 parent 8a3a8e0 commit 7da3991

File tree

7 files changed

+61
-7
lines changed

7 files changed

+61
-7
lines changed

.github/workflows/cd.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ jobs:
2525
java-version: '17'
2626
distribution: 'temurin'
2727

28+
- name: Set Docker API version
29+
run: echo "api.version=1.44" > $HOME/.docker-java.properties
30+
2831
- name: Build
2932
uses: gradle/gradle-build-action@v2
3033
with:
@@ -70,6 +73,9 @@ jobs:
7073
java-version: '17'
7174
distribution: 'temurin'
7275

76+
- name: Set Docker API version
77+
run: echo "api.version=1.44" > $HOME/.docker-java.properties
78+
7379
- name: Publish package
7480
uses: gradle/gradle-build-action@v2
7581
with:

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ jobs:
2727
java-version: '17'
2828
distribution: 'temurin'
2929

30+
- name: Set Docker API version
31+
run: echo "api.version=1.44" > $HOME/.docker-java.properties
32+
3033
- name: Build
3134
uses: gradle/gradle-build-action@v2
3235
with:

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,20 @@ To install the library, add the following lines to your build config file.
3838
<dependency>
3939
<groupId>io.qdrant</groupId>
4040
<artifactId>client</artifactId>
41-
<version>1.16.2</version>
41+
<version>1.17.0</version>
4242
</dependency>
4343
```
4444

4545
#### SBT
4646

4747
```sbt
48-
libraryDependencies += "io.qdrant" % "client" % "1.16.2"
48+
libraryDependencies += "io.qdrant" % "client" % "1.17.0"
4949
```
5050

5151
#### Gradle
5252

5353
```gradle
54-
implementation 'io.qdrant:client:1.16.2'
54+
implementation 'io.qdrant:client:1.17.0'
5555
```
5656

5757
> [!NOTE]

example/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repositories {
1313

1414
dependencies {
1515
// Qdrant Java client
16-
implementation 'io.qdrant:client:1.16.2'
16+
implementation 'io.qdrant:client:1.17.0'
1717

1818
// gRPC dependencies - use the same version as Qdrant client
1919
implementation 'io.grpc:grpc-netty-shaded:1.65.1'

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# The version of qdrant to use to download protos
2-
qdrantProtosVersion=v1.16.2
2+
qdrantProtosVersion=v1.17.0
33

44
# The version of qdrant docker image to run integration tests against
5-
qdrantVersion=v1.16.2
5+
qdrantVersion=v1.17.0
66

77
# The version of the client to generate
8-
packageVersion=1.16.2
8+
packageVersion=1.17.0

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

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,13 @@
3232
import io.qdrant.client.grpc.Collections.ListCollectionAliasesRequest;
3333
import io.qdrant.client.grpc.Collections.ListCollectionsRequest;
3434
import io.qdrant.client.grpc.Collections.ListCollectionsResponse;
35+
import io.qdrant.client.grpc.Collections.ListShardKeysRequest;
36+
import io.qdrant.client.grpc.Collections.ListShardKeysResponse;
3537
import io.qdrant.client.grpc.Collections.PayloadIndexParams;
3638
import io.qdrant.client.grpc.Collections.PayloadSchemaType;
3739
import io.qdrant.client.grpc.Collections.RenameAlias;
3840
import io.qdrant.client.grpc.Collections.ShardKey;
41+
import io.qdrant.client.grpc.Collections.ShardKeyDescription;
3942
import io.qdrant.client.grpc.Collections.UpdateCollection;
4043
import io.qdrant.client.grpc.Collections.UpdateCollectionClusterSetupRequest;
4144
import io.qdrant.client.grpc.Collections.UpdateCollectionClusterSetupResponse;
@@ -926,6 +929,37 @@ public ListenableFuture<DeleteShardKeyResponse> deleteShardKeyAsync(
926929
MoreExecutors.directExecutor());
927930
}
928931

932+
/**
933+
* List the shard keys of a collection.
934+
*
935+
* @param collectionName The name of the collection to list shard keys for.
936+
* @return a new instance of {@link ListenableFuture}
937+
*/
938+
public ListenableFuture<List<ShardKeyDescription>> listShardKeysAsync(String collectionName) {
939+
return listShardKeysAsync(collectionName, null);
940+
}
941+
942+
/**
943+
* List the shard keys of a collection.
944+
*
945+
* @param collectionName The name of the collection to list shard keys for.
946+
* @param timeout The timeout for the call.
947+
* @return a new instance of {@link ListenableFuture}
948+
*/
949+
public ListenableFuture<List<ShardKeyDescription>> listShardKeysAsync(
950+
String collectionName, @Nullable Duration timeout) {
951+
Preconditions.checkArgument(!collectionName.isEmpty(), "Collection name must not be empty");
952+
logger.debug("List shard keys for '{}'", collectionName);
953+
954+
ListenableFuture<ListShardKeysResponse> future =
955+
getCollections(timeout)
956+
.listShardKeys(
957+
ListShardKeysRequest.newBuilder().setCollectionName(collectionName).build());
958+
addLogFailureCallback(future, "List Shard Keys");
959+
return Futures.transform(
960+
future, response -> response.getShardKeysList(), MoreExecutors.directExecutor());
961+
}
962+
929963
// endregion
930964

931965
// region Point Management

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import io.qdrant.client.grpc.Points.OrderBy;
1717
import io.qdrant.client.grpc.Points.Query;
1818
import io.qdrant.client.grpc.Points.RecommendInput;
19+
import io.qdrant.client.grpc.Points.RelevanceFeedbackInput;
1920
import io.qdrant.client.grpc.Points.Rrf;
2021
import io.qdrant.client.grpc.Points.Sample;
2122
import io.qdrant.client.grpc.Points.VectorInput;
@@ -253,5 +254,15 @@ public static Query sample(Sample sample) {
253254
return Query.newBuilder().setSample(sample).build();
254255
}
255256

257+
/**
258+
* Creates a {@link Query} for search with feedback from some oracle.
259+
*
260+
* @param relevanceFeedback An instance of {@link RelevanceFeedbackInput}
261+
* @return A new instance of {@link Query}
262+
*/
263+
public static Query relevanceFeedback(RelevanceFeedbackInput relevanceFeedback) {
264+
return Query.newBuilder().setRelevanceFeedback(relevanceFeedback).build();
265+
}
266+
256267
// endregion
257268
}

0 commit comments

Comments
 (0)