Skip to content

Commit bbc813e

Browse files
committed
feat: Added new RRF Query helper.
Signed-off-by: Anush008 <[email protected]>
1 parent a50d12d commit bbc813e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

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.PointId;
1717
import io.qdrant.client.grpc.Points.Query;
1818
import io.qdrant.client.grpc.Points.RecommendInput;
19+
import io.qdrant.client.grpc.Points.Rrf;
1920
import io.qdrant.client.grpc.Points.Sample;
2021
import io.qdrant.client.grpc.Points.VectorInput;
2122
import java.util.List;
@@ -65,6 +66,16 @@ public static Query fusion(Fusion fusion) {
6566
return Query.newBuilder().setFusion(fusion).build();
6667
}
6768

69+
/**
70+
* Creates a {@link Query} for reciprocal rank fusion (RRF).
71+
*
72+
* @param rrf An instance of {@link Rrf}
73+
* @return a new instance of {@link Query}
74+
*/
75+
public static Query rrf(Rrf rrf) {
76+
return Query.newBuilder().setRrf(rrf).build();
77+
}
78+
6879
/**
6980
* Creates a {@link Query} to order points by a payload field.
7081
*

0 commit comments

Comments
 (0)