Skip to content

Commit

Permalink
Merge branch '1.7.0' of https://github.com/qdrant/java-client into 1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Anush008 committed Dec 7, 2023
2 parents e31d89a + 8a51ef9 commit 1d61fb9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
12 changes: 12 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,18 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.coveo</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.9</version>
<executions>
<execution>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<distributionManagement>
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/io/qdrant/client/utils/PointUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ public static PointsSelector createPointsSelector(long... pointIds) {

PointsIdsList pointsIdsList =
PointsIdsList.newBuilder()
.addAllIds(Arrays.stream(pointIds).mapToObj(PointUtil::pointId).collect(Collectors.toList()))
.addAllIds(
Arrays.stream(pointIds).mapToObj(PointUtil::pointId).collect(Collectors.toList()))
.build();

return PointsSelector.newBuilder().setPoints(pointsIdsList).build();
Expand All @@ -52,7 +53,10 @@ public static PointsSelector createPointsSelector(String... pointIds) {
// Using map() instead
PointsIdsList pointsIdsList =
PointsIdsList.newBuilder()
.addAllIds(Arrays.stream(pointIds).map((String id) -> PointUtil.pointId(id)).collect(Collectors.toList()))
.addAllIds(
Arrays.stream(pointIds)
.map((String id) -> PointUtil.pointId(id))
.collect(Collectors.toList()))
.build();

return PointsSelector.newBuilder().setPoints(pointsIdsList).build();
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/io/qdrant/client/utils/SelectorUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import io.qdrant.client.grpc.Points.VectorsSelector;
import io.qdrant.client.grpc.Points.WithPayloadSelector;
import io.qdrant.client.grpc.Points.WithVectorsSelector;

import java.util.Arrays;
import java.util.List;

Expand Down Expand Up @@ -55,7 +54,8 @@ public static WithPayloadSelector withPayload(String... fields) {
* @return The created {@link WithVectorsSelector} object.
*/
public static WithVectorsSelector withVectors(String... vectors) {
VectorsSelector include = VectorsSelector.newBuilder().addAllNames(Arrays.asList(vectors)).build();
VectorsSelector include =
VectorsSelector.newBuilder().addAllNames(Arrays.asList(vectors)).build();
return WithVectorsSelector.newBuilder().setInclude(include).build();
}

Expand Down

0 comments on commit 1d61fb9

Please sign in to comment.