[SERVER-33442] Problems using the $[<identifier] operator in 3.6.2 Created: 22/Feb/18 Updated: 16/Aug/18 Resolved: 23/Mar/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 3.6.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Morten L | Assignee: | Kelsey Schubert |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Participants: |
| Description |
|
Hello, I'm having major problems getting the new $[<identifier] operator to work as expected in mongodb v. 3.6.2. I have a collection containing the following type of documents:
I'm executing the following update stmt:
And I get the following result:
I thought it might be my mongodb installation which was somehow corrupted so I did the following to verify that this was not the issue: 1) Went to Mongo Atlas and create a whole new cluster with version 3.6.2 of mongodb. 2) Create a collection, "students2", containing the following two documents:
3) Executed the following command:
This resulted in a new error:
Pease note that the above have been taking directly from https://docs.mongodb.com/manual/reference/operator/update/positional-filtered/#update-all-documents-that-match-arrayfilters-in-an-array without modifying it the slightest. |
| Comments |
| Comment by Dominic Kerchner [ 16/Aug/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Kelsey Schubert [ 16/Aug/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi dkerchner, Yes, please open a new ticket so we can investigate — if you have a reproducer, please include it. Thank you, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Dominic Kerchner [ 16/Aug/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi, I am experiencing this issue today with 3.6.6. I have even tried with the samples and I still get the 'array filter not found' error. Should I open a new ticket?
Thanks, Dominic | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Kelsey Schubert [ 23/Mar/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi mlarsson, We haven’t heard back from you for some time, so I’m going to mark this ticket as resolved. If this is still an issue for you, please provide additional information and we will reopen the ticket. Regards, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Kelsey Schubert [ 06/Mar/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I've also tried to reproduce your second example without any luck. Please see below:
Would you please confirm that you're still able to reproduce this issue? Have you tried these steps on a brand new collection? Thank you, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Morten Larsson [ 01/Mar/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Ramón. I uploaded something for you now. Kind regards Morten | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Ramon Fernandez Marina [ 22/Feb/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
mlarsson, I am unable to reproduce either behavior; here's a toy example that I think matches your first case:
When I put the above in a test.js file and run mongo < test.js I get:
Same thing for the example from our docs:
Do you think you can create a reproducer that shows the behavior you're describing? I've also created a secure upload portal if you want to upload a copy of your collection where the behavior reproduces. Thanks, |