|
Drivers should use the new createIndexes command when it is available. As with DRIVERS-103, drivers should call the createIndexes command, and if the command is not found, fall back to the old behavior:
try
|
db.runCommand({'createIndexes': ...})
|
catch error
|
if error code == 59 or error code == Null
|
<fallback to existing code for backward compatibility>
|
else
|
re-raise error
|
For drivers that are already getting the server version by calling buildInfo, the build version can be used as an alternative approach.
|