[SERVER-2884] Array ordering semantics are different with index than without an index Created: 01/Apr/11 Updated: 12/Jul/16 Resolved: 03/Jun/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.9.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Aaron Staple | Assignee: | Aaron Staple |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Participants: |
| Description |
|
> db.c.save( {a:[1,10]} ); ); ) { "_id" : ObjectId("4d95731036d6ac4c79650e64"), "a" : 5 } { "_id" : ObjectId("4d95730836d6ac4c79650e63"), "a" : [ 1, 10 ] }> db.c.find().sort( {a:-1}) { "_id" : ObjectId("4d95730836d6ac4c79650e63"), "a" : [ 1, 10 ] } { "_id" : ObjectId("4d95731036d6ac4c79650e64"), "a" : 5 }> db.c.ensureIndex( {a:1} ); ) { "_id" : ObjectId("4d95730836d6ac4c79650e63"), "a" : [ 1, 10 ] } { "_id" : ObjectId("4d95731036d6ac4c79650e64"), "a" : 5 }> db.c.find().sort( {a:-1}) { "_id" : ObjectId("4d95730836d6ac4c79650e63"), "a" : [ 1, 10 ] } { "_id" : ObjectId("4d95731036d6ac4c79650e64"), "a" : 5 }> |
| Comments |
| Comment by auto [ 02/Jun/11 ] |
|
Author: {u'login': u'astaple', u'name': u'Aaron', u'email': u'aaron@10gen.com'}Message: |
| Comment by auto [ 19/Apr/11 ] |
|
Author: {u'login': u'astaple', u'name': u'Aaron', u'email': u'aaron@10gen.com'}Message: |