Skip to content

Commit a50d12d

Browse files
committed
matchTextAny
Signed-off-by: Anush008 <[email protected]>
1 parent d4a16d9 commit a50d12d

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,23 @@ public static Condition matchPhrase(String field, String phrase) {
125125
.build();
126126
}
127127

128+
/**
129+
* Match records where the given field matches any word in the text.
130+
*
131+
* @param field The name of the field
132+
* @param textAny The text to match
133+
* @return a new instance of {@link Condition}
134+
*/
135+
public static Condition matchTextAny(String field, String textAny) {
136+
return Condition.newBuilder()
137+
.setField(
138+
FieldCondition.newBuilder()
139+
.setKey(field)
140+
.setMatch(Match.newBuilder().setTextAny(textAny).build())
141+
.build())
142+
.build();
143+
}
144+
128145
/**
129146
* Match records where the given field matches the given boolean value.
130147
*

0 commit comments

Comments
 (0)