code: function createIndexes(coll, indexSpecs, options, callback) {
    const capabilities = coll.s.topology.capabilities();
  
    // Ensure we generate the correct name if the parameter is not set
    for (let i = 0; i < indexSpecs.length; i++) {
      if (indexSpecs[i].name == null) {
        const keys = [];
  
        // Did the user pass in a collation, check if our write server supports it
        if (indexSpecs[i].collation && capabilities && !capabilities.commandsTakeCollation) {
          return callback(new MongoError('server/primary/mongos does not support collation'));
        }
  
        for (let name in indexSpecs[i].key) {
          keys.push(`${name}_${indexSpecs[i].key[name]}`);
        }
  
        // Set the name
        indexSpecs[i].name = keys.join('_');
      }
    }
  
    options = Object.assign({}, options, { readPreference: ReadPreference.PRIMARY });
  
    // Execute the index
    executeCommand(
      coll.s.db,
      {
        createIndexes: coll.s.name,
        indexes: indexSpecs
      },
      options,
      callback
    );
  }
docs: Create multiple indexes in the collection. This method is only supported for
  MongoDB 2.6 or higher. Earlier version of MongoDB will throw a command not supported
  error. Index specifications are defined at http://docs.mongodb.org/manual/reference/command/createIndexes/.
  
  @method
  @param {Collection} a Collection instance.
  @param {array} indexSpecs An array of index specifications to be created
  @param {Object} [options] Optional settings. See Collection.prototype.createIndexes for a list of options.
  @param {Collection~resultCallback} [callback] The command result callback