-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 1.21.2
-
Component/s: Aggregation pipeline
-
None
-
Iteration Elderberry
The current default query for $search is
/** * search: Analyzed search. * term: Unanalyzed search. * compound: Combines ops. * span: Find in text field regions. * exists: Test for presence of a field. * near: Find near number or date. * range: Find in numeric or date range. */ { search: { query: 'string' path: 'string' } }
the search: operator has been deprecated. It should be replaced with text:
/** * text: Analyzed search. * term: Unanalyzed search. * compound: Combines ops. * span: Find in text field regions. * exists: Test for presence of a field. * near: Find near number or date. * range: Find in numeric or date range. */ { text: { query: 'string', path: 'string' } }
It's also missing a comma between the query option and the path option, which could be confusing.