-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.4.0
-
Component/s: Index Maintenance, Querying
-
None
-
Environment:Linux (Ubuntu 9.10 on Asus Eee PC 901)
-
Minor Change
Sorting of infinity and -infinity does not produce expected results:
> db.test.save(
{number: 1})
> db.test.save(
)
> db.test.save(
)
> db.test.save(
)
> db.test.save(
)
> db.test.find().sort(
)
{ "_id" : ObjectId("4bbdd056ac64d9763fe0bccf"), "number" : Infinity } { "_id" : ObjectId("4bbdd059ac64d9763fe0bcd0"), "number" : -Infinity } { "_id" : ObjectId("4bbdd04dac64d9763fe0bccc"), "number" : 1 } { "_id" : ObjectId("4bbdd04fac64d9763fe0bccd"), "number" : 2 } { "_id" : ObjectId("4bbdd051ac64d9763fe0bcce"), "number" : 3 }The expected order is [-Infinity, 1, 2, 3, Infinity].
- related to
-
SERVER-9277 Ranged index bounds do not permit retrieving Infinity or -Infinity
- Closed