[SERVER-65808] $search as subpipeline of $lookup with localField+foreignField is not supported Created: 20/Apr/22 Updated: 29/Oct/23 Resolved: 29/Apr/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 6.0.0-rc0 |
| Fix Version/s: | 6.0.0-rc4, 6.1.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Katya Kamenieva | Assignee: | Ruslan Abdulkhalikov (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | search | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||||||
| Backport Requested: |
v6.0
|
||||||||||||||||||||
| Sprint: | QO 2022-05-02 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
A pipeline like this works as expected:
But equivalent expressed with localField/foreignField produces an error.
"$_internalSearchMongotRemote is only valid as the first stage in a pipeline" |
| Comments |
| Comment by Githook User [ 29/Apr/22 ] |
|
Author: {'name': 'ruslan.abdulkhalikov', 'email': 'ruslan.abdulkhalikov@mongodb.com', 'username': 'rusabd1'}Message: (cherry picked from commit 736d9efe5ef102c2d4e5de5d268787030cd4c346) |
| Comment by Githook User [ 29/Apr/22 ] |
|
Author: {'name': 'ruslan.abdulkhalikov', 'email': 'ruslan.abdulkhalikov@mongodb.com', 'username': 'rusabd1'}Message: (cherry picked from commit d24a16c3ba4902526b9ce60ce245a2dc473b3de3) |
| Comment by Githook User [ 28/Apr/22 ] |
|
Author: {'name': 'ruslan.abdulkhalikov', 'email': 'ruslan.abdulkhalikov@mongodb.com', 'username': 'rusabd1'}Message: |
| Comment by Githook User [ 28/Apr/22 ] |
|
Author: {'name': 'ruslan.abdulkhalikov', 'email': 'ruslan.abdulkhalikov@mongodb.com', 'username': 'rusabd1'}Message: |
| Comment by David Storch [ 21/Apr/22 ] |
|
jonathan.streets@mongodb.com kateryna.kamenieva@mongodb.com ruslan.abdulkhalikov@mongodb.com I'm wondering why this was marked "6.0 Required", could you elaborate? This behavior was purposeful when we first implemented |
| Comment by David Storch [ 20/Apr/22 ] |
|
The error message isn't very good, but this was definitely intentionally excluded from our original efforts to allow $search inside a $lookup sub-pipeline. For this reason, I'm going to convert this ticket from type "Bug" to type "Improvement". |