-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
Currently if a variable occurs in a $search stage, we do nothing to interpret it and send it as a string to Lucene. We should discuss transforming
{ $search: { index: 'default', text: { query: '$$name', path: 'name' } } }
to
{ $search: { index: 'default', text: { query: 'Jacob', path: 'name' } } }
for each document. We would also need to track the variable usage within the stage to ensure correctness.
Note that there would be no plans to evaluate field references so single-dollar-sign-prefixed names would not be resolved. '$name' would not result in a per-document value but instead would continue to produce the literal string '$name'.
- is related to
-
SERVER-60800 Allow $search in $lookup/$unionWith
- Closed