-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Minor Change
Another API conformity ticket.
The following existing method will change:
- create_index will no longer "cache" successfully created indexes client side. create_index continues to always attempt to create an index on the server. If the index already exists this is a no-op on the server.
The following method is deprecated:
- ensure_index - The difference between ensure_index and create_index is that ensure_index consults an index "cache" before sending a create index operation to the server. This causes hard to debug race conditions when dropping and immediately re-creating an index, and provides no real benefits. To avoid these problems we're deprecating the method. Use create_index instead.
The following methods are added:
- create_indexes - like create_index but takes a list of index specs and creates multiple indexes. Only supported by MongoDB 2.6 and newer.
- list_indexes - Returns a cursor over all indexes for the given collection.