Skip to content

Commit 3ded9e8

Browse files
authored
Merge pull request #77 from qdrant/1-15-0
v1.15.0
2 parents 840a42d + f8d67bb commit 3ded9e8

File tree

5 files changed

+41
-7
lines changed

5 files changed

+41
-7
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ Once the new Qdrant version is live:
115115

116116
- `qdrantVersion` - Set it to the released Docker image version for testing.
117117
- `qdrantProtosVersion` - Set it to the released version of the Qdrant source for fetching the proto files.
118+
- Update the package version references in the README.md.
118119

119120
2. Merge the pull request.
120121

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.14.0</version>
41+
<version>1.15.0</version>
4242
</dependency>
4343
```
4444

4545
#### SBT
4646

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

5151
#### Gradle
5252

5353
```gradle
54-
implementation 'io.qdrant:client:1.14.0'
54+
implementation 'io.qdrant:client:1.15.0'
5555
```
5656

5757
> [!NOTE]

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.14.0
2+
qdrantProtosVersion=v1.15.0
33

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

77
# The version of the client to generate
8-
packageVersion=1.14.1
8+
packageVersion=1.15.0

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,23 @@ public static Condition matchText(String field, String text) {
108108
.build();
109109
}
110110

111+
/**
112+
* Match records where the given field matches the given phrase.
113+
*
114+
* @param field The name of the field
115+
* @param phrase The phrase to match
116+
* @return a new instance of {@link Condition}
117+
*/
118+
public static Condition matchPhrase(String field, String phrase) {
119+
return Condition.newBuilder()
120+
.setField(
121+
FieldCondition.newBuilder()
122+
.setKey(field)
123+
.setMatch(Match.newBuilder().setPhrase(phrase).build())
124+
.build())
125+
.build();
126+
}
127+
111128
/**
112129
* Match records where the given field matches the given boolean value.
113130
*

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
import io.qdrant.client.grpc.Points.Document;
99
import io.qdrant.client.grpc.Points.Formula;
1010
import io.qdrant.client.grpc.Points.Fusion;
11+
import io.qdrant.client.grpc.Points.Image;
1112
import io.qdrant.client.grpc.Points.InferenceObject;
13+
import io.qdrant.client.grpc.Points.Mmr;
14+
import io.qdrant.client.grpc.Points.NearestInputWithMmr;
1215
import io.qdrant.client.grpc.Points.OrderBy;
1316
import io.qdrant.client.grpc.Points.PointId;
1417
import io.qdrant.client.grpc.Points.Query;
@@ -192,7 +195,7 @@ public static Query nearest(Document document) {
192195
* @param image The image to vectorize and query against.
193196
* @return a new instance of {@link Query}
194197
*/
195-
public static Query nearest(io.qdrant.client.grpc.Points.Image image) {
198+
public static Query nearest(Image image) {
196199
return Query.newBuilder().setNearest(vectorInput(image)).build();
197200
}
198201

@@ -206,6 +209,19 @@ public static Query nearest(InferenceObject object) {
206209
return Query.newBuilder().setNearest(vectorInput(object)).build();
207210
}
208211

212+
/**
213+
* Creates a {@link Query} for re-ranking points with MMR (Maximum Marginal Relevance).
214+
*
215+
* @param nearest The vector input for nearest search.
216+
* @param mmr The MMR configuration.
217+
* @return a new instance of {@link Query}
218+
*/
219+
public static Query nearest(VectorInput nearest, Mmr mmr) {
220+
return Query.newBuilder()
221+
.setNearestWithMmr(NearestInputWithMmr.newBuilder().setNearest(nearest).setMmr(mmr).build())
222+
.build();
223+
}
224+
209225
/**
210226
* Creates a {@link Query} from a nested list of floats representing a multi vector
211227
*

0 commit comments

Comments
 (0)