-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Index Maintenance
-
None
-
Query
-
ALL
test@127.0.0.1:27017(4.0.0) > db.partial.ensureIndex({i: 1}, {partialFilterExpression: {dt: {$gte:ISODate("2016-07-12T23:58:24.278Z"),$lt: ISODate("2016-07-12T23:58:33.773Z")}}}); { "createdCollectionAutomatically" : false, "numIndexesBefore" : 4, "numIndexesAfter" : 5, "ok" : 1 } test@127.0.0.1:27017(4.0.0) > db.partial.ensureIndex({i: 1}, {partialFilterExpression: {dt: {$gte:ISODate("2016-07-12T23:58:24.278Z"),$lt: ISODate("2016-07-12T23:58:33.773Z")}},name:"i_1_partial2"}) { "createdCollectionAutomatically" : false, "numIndexesBefore" : 5, "numIndexesAfter" : 5, "note" : "all indexes already exist", "ok" : 1 } test@127.0.0.1:27017(4.0.0) > db.partial.ensureIndex({i: 1}, {partialFilterExpression: {dt: {$lt: ISODate("2016-07-12T23:58:33.773Z"), $gte:ISODate("2016-07-12T23:58:24.278Z")}},name:"i_1_partial3"}) { "ok" : 0, "errmsg" : "Index: { v: 2, key: { i: 1.0 }, name: \"i_1_partial3\", ns: \"test.partial\", partialFilterExpression: { dt: { $lt: new Date(1468367913773), $gte: new Date(1468367904278) } } } already exists with different options: { v: 2, key: { i: 1.0 }, name: \"i_1\", ns: \"test.partial\", partialFilterExpression: { dt: { $gte: new Date(1468367904278), $lt: new Date(1468367913773) } } }", "code" : 85, "codeName" : "IndexOptionsConflict" }
But changing order in logical $and expression is not actually conflicting...
- duplicates
-
SERVER-27464 Server allows creation of duplicate indexes
- Backlog
- is related to
-
NODE-1574 Incorrect error message when re-creating an index
- Closed