Skip to content

Commit ffc4b4d

Browse files
committed
v1.15.0
Signed-off-by: Anush008 <anushshetty90@gmail.com>
1 parent acde2bd commit ffc4b4d

5 files changed

Lines changed: 41 additions & 7 deletions

File tree

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
@@ -34,20 +34,20 @@ To install the library, add the following lines to your build config file.
3434
<dependency>
3535
<groupId>io.qdrant</groupId>
3636
<artifactId>client</artifactId>
37-
<version>1.14.0</version>
37+
<version>1.15.0</version>
3838
</dependency>
3939
```
4040

4141
#### SBT
4242

4343
```sbt
44-
libraryDependencies += "io.qdrant" % "client" % "1.14.0"
44+
libraryDependencies += "io.qdrant" % "client" % "1.15.0"
4545
```
4646

4747
#### Gradle
4848

4949
```gradle
50-
implementation 'io.qdrant:client:1.14.0'
50+
implementation 'io.qdrant:client:1.15.0'
5151
```
5252

5353
> [!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=expose-mmr
33

44
# The version of qdrant docker image to run integration tests against
5-
qdrantVersion=v1.14.1
5+
qdrantVersion=dev
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)