[SERVER-12860] Index on sub-document in _id Created: 24/Feb/14 Updated: 23/Mar/14 Resolved: 23/Mar/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | 2.5.5 |
| Fix Version/s: | None |
| Type: | Question | Priority: | Major - P3 |
| Reporter: | Dr. Markus Schmidberger | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
Hi, we have a database design with a sub-document in the _id field. Now we have the problem the the field order matters (compare documentation http://docs.mongodb.org/manual/core/index-single/#indexes-on-subdocuments) and the following example: db.test.insert({"_id":{"uid":1, "city":"Munich"}}) } What is the best solution to solve our issue? Do we have to redesign our complete data structure? Thanks a lot |
| Comments |
| Comment by Dr. Markus Schmidberger [ 20/Mar/14 ] |
|
Ok, we now use a consistent order of the subdocuments. You can close this issue. |
| Comment by Eliot Horowitz (Inactive) [ 24/Feb/14 ] |
|
Is there a reason you can't use a consistent order for the subdocuments? |