[SERVER-40687] Positional projection ($) only considers first path component when comparing to query document Created: 17/Apr/19 Updated: 29/Oct/23 Resolved: 07/Dec/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 4.0.9 |
| Fix Version/s: | 4.3.3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Piyush Kumar | Assignee: | Ian Boros |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | query-44-grooming | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Sprint: | Query 2019-12-02, Query 2019-12-16 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||
| Description |
|
Using a non-matching subfield (e.g., query: fieldExists.something: 1 projection: fieldExists.fieldDoesntExist.$) with the $ projection operator does not return the Positional projection 'fieldExists.fieldDoesntExist.$' does not match the query document error.
The {"AOE.doesntExist.$":1} projection is treated the same as the correct {"AOE.$":1} projection:
|
| Comments |
| Comment by Ian Boros [ 06/Jan/20 ] | ||||||||||||||||||||||||||||||||||
|
asya That's correct. | ||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 06/Dec/19 ] | ||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Ian Boros', 'username': 'puppyofkosh', 'email': 'ian.boros@mongodb.com'}Message: | ||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 06/Dec/19 ] | ||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Ian Boros', 'username': 'puppyofkosh', 'email': 'ian.boros@mongodb.com'}Message: | ||||||||||||||||||||||||||||||||||
| Comment by Ian Boros [ 03/Dec/19 ] | ||||||||||||||||||||||||||||||||||
|
Ping asya | ||||||||||||||||||||||||||||||||||
| Comment by Piyush Kumar [ 18/Apr/19 ] | ||||||||||||||||||||||||||||||||||
|
Thank you Eric for making this issue well documented. | ||||||||||||||||||||||||||||||||||
| Comment by Eric Sedor [ 18/Apr/19 ] | ||||||||||||||||||||||||||||||||||
|
Thank you piyushkumar96; We understand what you are saying and are looking into this. I've also transferred your clarification into the original description of the ticket. | ||||||||||||||||||||||||||||||||||
| Comment by Piyush Kumar [ 18/Apr/19 ] | ||||||||||||||||||||||||||||||||||
|
Hi Eric,
if I am using the query (wrong query) which is mentioned below, its still giving the output not throwing the error.
| ||||||||||||||||||||||||||||||||||
| Comment by Eric Sedor [ 17/Apr/19 ] | ||||||||||||||||||||||||||||||||||
|
Would you be able to provide the contents of the document without a projection, to help us understand what you are expecting? |