@@ -480,6 +480,14 @@ public Builder<T> whereGeoIntersects(String key, ParseGeoPoint point) {
480
480
return addCondition (key , "$geoIntersects" , dictionary );
481
481
}
482
482
483
+ public Builder <T > whereText (String key , String value ) {
484
+ Map <String , String > termDictionary = new HashMap <>();
485
+ Map <String , Map <String , String >> searchDictionary = new HashMap <>();
486
+ termDictionary .put ("$term" , value );
487
+ searchDictionary .put ("$search" , termDictionary );
488
+ return addCondition (key , "$text" , searchDictionary );
489
+ }
490
+
483
491
public Builder <T > addCondition (String key , String condition ,
484
492
Collection <? extends Object > value ) {
485
493
return addConditionInternal (key , condition , Collections .unmodifiableCollection (value ));
@@ -1683,6 +1691,23 @@ public ParseQuery<T> whereContainsAll(String key, Collection<?> values) {
1683
1691
return this ;
1684
1692
}
1685
1693
1694
+ /**
1695
+ * Adds a constraint for finding string values that contain a provided
1696
+ * string using Full Text Search
1697
+ *
1698
+
1699
+ *
1700
+ * @param key
1701
+ * The key to be constrained.
1702
+ * @param text
1703
+ * String to be searched
1704
+ * @return this, so you can chain this call.
1705
+ */
1706
+ public ParseQuery <T > whereFullText (String key , String text ) {
1707
+ builder .whereText (key , text );
1708
+ return this ;
1709
+ }
1710
+
1686
1711
/**
1687
1712
* Add a constraint to the query that requires a particular key's value match another
1688
1713
* {@code ParseQuery}.
0 commit comments