@@ -480,6 +480,14 @@ public Builder<T> whereGeoIntersects(String key, ParseGeoPoint point) {
480480 return addCondition (key , "$geoIntersects" , dictionary );
481481 }
482482
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+
483491 public Builder <T > addCondition (String key , String condition ,
484492 Collection <? extends Object > value ) {
485493 return addConditionInternal (key , condition , Collections .unmodifiableCollection (value ));
@@ -1683,6 +1691,23 @@ public ParseQuery<T> whereContainsAll(String key, Collection<?> values) {
16831691 return this ;
16841692 }
16851693
1694+ /**
1695+ * Adds a constraint for finding string values that contain a provided
1696+ * string using Full Text Search
1697+ *
1698+ * Requires Parse-Server@2.5.0
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+
16861711 /**
16871712 * Add a constraint to the query that requires a particular key's value match another
16881713 * {@code ParseQuery}.
0 commit comments