[SERVER-12173] when $text is in $or, it should be evalutate first Created: 20/Dec/13 Updated: 11/Jul/16 Resolved: 30/Dec/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying, Text Search |
| Affects Version/s: | None |
| Fix Version/s: | 2.5.5 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Kay Kim (Inactive) | Assignee: | Benety Goh |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Participants: | |||||||||
| Description |
|
I'm able to use $text expression in $or when I shouldn't be.
returns
And like the ticket regarding $and and two text expression, I'm also allowed currently to do $or and two text expressions. But I figure one of these two tickets would make that situation moot. |
| Comments |
| Comment by Githook User [ 30/Dec/13 ] | ||||
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: | ||||
| Comment by J Rassi [ 22/Dec/13 ] | ||||
|
eliot: the current design problem is that the OrStage is non-blocking, and so {$meta:"textScore"} queries with $or can return documents to the user before the TextStage encounters that document, and those documents get assigned the null score (zero). See example:
Put another way: there's no dependency resolution mechanism that causes the OrStage to buffer the {_id:0} document, such that it is returned only after its score is calculated. What's your suggestion to fix for 2.6, other than disallowing $text inside $or? | ||||
| Comment by Eliot Horowitz (Inactive) [ 22/Dec/13 ] | ||||
|
Why do you think you shouldn't be able to do this? |