[SERVER-15918] Unable to create field with update which is calculated with size array. Created: 03/Nov/14 Updated: 03/Dec/14 Resolved: 03/Dec/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 2.6.4 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | GERVAIS Mickaël | Assignee: | Ramon Fernandez Marina |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Description |
|
Hi, I've a document which contains an array of nested object.
My collection contains 2610537 documents, so the query is very long. (Too long for me) I think it will be quicker to have an intermadiate field with the markers size. But I cannot write the update query:
This give me this error: But 'markers' is my arrays of nested objects. so this field exist. After reading the doc, $size is not part of update operators... Is there a way to handle this case? (I know , I can do this on update or insert process) Thanks Mickael |
| Comments |
| Comment by Ramon Fernandez Marina [ 03/Dec/14 ] |
|
mgervais, a colleague points out there's already a ticket requesting a wider set of features like this one, so I'm going to mark this ticket as a duplicate of Regards, |
| Comment by Asya Kamsky [ 07/Nov/14 ] |
|
That seems to be an improvement similar or identical to |
| Comment by GERVAIS Mickaël [ 04/Nov/14 ] |
|
Hi, Excuse me for the bad post location. I'll move this question, but I think this is a king of improvement for update operators. Thanks for your response. Mickael |
| Comment by Ramon Fernandez Marina [ 03/Nov/14 ] |
|
Thanks for your report @mgervais. Note that the SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag, where your question will reach a larger audience. A question like this involving more discussion would be best posted on the mongodb-user group. Regards, |