-
Type: Improvement
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 1.8.1
-
Component/s: None
-
None
-
Minor Change
EnsureIndex attempts to remember which indexes already exist in order to avoid a round trip to the server if possible. However, this is fragile because EnsureIndex can't know what's going on in other processes. It is better to just let the server decide if the index already exists or not.
Caching was the only difference between EnsureIndex and CreateIndex. Since these two methods now do the same thing we are deprecating CreateIndex (note that the shell deprecated createIndex as far back as version 1.8 of the server).