[SERVER-3175] Compound index on objects embedded in array can lead to inconsistent query results Created: 01/Jun/11 Updated: 12/Jul/16 Resolved: 25/Oct/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Bryon Ross | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Participants: |
| Description |
|
Creating a compound index on fields of objects embedded in an array can change the behavior of queries on those fields. It's easiest to demonstrate this behavior using an example. In the test case below, see that querying using the index produces no results, while the same query using no index produces one result. Test case: , { "animal" : "dog", "size" : "medium" } ]});; ); ); ).hint( { "$natural" : 1 }); , { "animal" : "dog", "size" : "medium" }] } |
| Comments |
| Comment by Bryon Ross [ 24/Oct/11 ] |
|
It appears that this issue has been fixed in 2.0. |