Skip to content

Commit

Permalink
Prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
Jotschi committed May 24, 2023
1 parent 6f5b7a9 commit 78ace35
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 10 deletions.
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ This project contains a java client for the [Qdrant vector database](https://qdr
<dependency>
<groupId>io.metaloom.qdrant</groupId>
<artifactId>qdrant-java-grpc-client</artifactId>
<version>0.13.0-SNAPSHOT</version>
<version>0.13.0</version>
</dependency>
```

Expand All @@ -46,7 +46,7 @@ or for the HTTP client
<dependency>
<groupId>io.metaloom.qdrant</groupId>
<artifactId>qdrant-java-http-client</artifactId>
<version>0.13.0-SNAPSHOT</version>
<version>0.13.0</version>
</dependency>
```

Expand Down Expand Up @@ -74,8 +74,14 @@ try (QDrantGRPCClient client = QDrantGRPCClient.builder()
.setDistance(Distance.Euclid)
.build();

// Add the params to a map
VectorParamsMap paramsMap = VectorParamsMap.newBuilder()
.putMap("firstVector", params)
.putMap("secondVector", params)
.build();

// Create new collections - blocking
client.createCollection("test1", params).sync();
client.createCollection("test1", paramsMap).sync();
// .. or via Future API
client.createCollection("test2", params).async().get();
// .. or via RxJava API
Expand All @@ -92,7 +98,7 @@ try (QDrantGRPCClient client = QDrantGRPCClient.builder()
payload.put("color", ModelHelper.value("blue"));

// Now construct the point
PointStruct point = ModelHelper.point(42L + i, vector, payload);
PointStruct point = ModelHelper.namedPoint(42L + i, "firstVector", vector, payload);
// .. and insert it
client.upsertPoint("test1", point, true).sync();
}
Expand All @@ -102,7 +108,7 @@ try (QDrantGRPCClient client = QDrantGRPCClient.builder()

// Now run KNN search
float[] searchVector = new float[] { 0.43f, 0.09f, 0.41f, 1.35f };
List<ScoredPoint> searchResults = client.searchPoints("test1", searchVector, 2, null).sync().getResultList();
List<ScoredPoint> searchResults = client.searchPoints("test1", "firstVector", searchVector, 2, null).sync().getResultList();
for (ScoredPoint result : searchResults) {
System.out.println("Found: [" + result.getId().getNum() + "] " + result.getScore());
}
Expand Down
2 changes: 1 addition & 1 deletion common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>io.metaloom.qdrant</groupId>
<artifactId>qdrant-java-client</artifactId>
<version>0.13.0-SNAPSHOT</version>
<version>0.13.0</version>
</parent>

<name>Qdrant Java Client :: common</name>
Expand Down
2 changes: 1 addition & 1 deletion grpc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>io.metaloom.qdrant</groupId>
<artifactId>qdrant-java-client</artifactId>
<version>0.13.0-SNAPSHOT</version>
<version>0.13.0</version>
</parent>

<name>Qdrant Java Client :: grpc</name>
Expand Down
2 changes: 1 addition & 1 deletion http/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>io.metaloom.qdrant</groupId>
<artifactId>qdrant-java-client</artifactId>
<version>0.13.0-SNAPSHOT</version>
<version>0.13.0</version>
</parent>

<name>Qdrant Java Client :: http</name>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.metaloom.qdrant</groupId>
<artifactId>qdrant-java-client</artifactId>
<version>0.13.0-SNAPSHOT</version>
<version>0.13.0</version>

<parent>
<groupId>io.metaloom</groupId>
Expand Down
2 changes: 1 addition & 1 deletion report/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>io.metaloom.qdrant</groupId>
<artifactId>qdrant-java-client</artifactId>
<version>0.13.0-SNAPSHOT</version>
<version>0.13.0</version>
</parent>

<name>Qdrant Java Client :: report</name>
Expand Down

0 comments on commit 78ace35

Please sign in to comment.