-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Index Maintenance
-
None
-
Query Optimization
-
Major Change
With support for a server applied filter you will be able to get just indexes you care about.
> db.a.runCommand("listIndexes") { "cursor" : { "id" : NumberLong(0), "ns" : "test.$cmd.listIndexes.a", "firstBatch" : [ { "v" : 1, "key" : { "_id" : 1 }, "name" : "_id_", "ns" : "test.a" }, { "v" : 1, "key" : { "a" : 1 }, "name" : "a_1", "ns" : "test.a" }, { "v" : 1, "key" : { "b" : 1 }, "name" : "b_1", "ns" : "test.a" } ] }, "ok" : 1 } > db.a.runCommand("listIndexes", {filter:{"key.a":{$exists:1}}}) { "cursor" : { "id" : NumberLong(0), "ns" : "test.$cmd.listIndexes.a", "firstBatch" : [ { "v" : 1, "key" : { "a" : 1 }, "name" : "a_1", "ns" : "test.a" } ] }, "ok" : 1 }
- is depended on by
-
DRIVERS-244 get index by name
- Closed
- is duplicated by
-
SERVER-21888 Provide operation to determine if an index exists
- Closed