driver-legacy/src/main/com/mongodb/DBCollection.java
public void createIndex(final DBObject keys, final DBObject options) {
        try {
            executor.execute(createIndexOperation(keys, options), getReadConcern());
        } catch (MongoWriteConcernException e) {
            throw createWriteConcernException(e);
        }
    }
public void createIndex(final DBObject keys, final DBObject options) {
        try {
            executor.execute(createIndexOperation(keys, options), getReadConcern());
        } catch (MongoWriteConcernException e) {
            throw createWriteConcernException(e);
        }
    }
public void createIndex ( final DBObject keys , final DBObject options ) { try { executor . execute ( createIndexOperation ( keys , options ) , getReadConcern ( ) ) ; } catch ( MongoWriteConcernException e ) { throw createWriteConcernException ( e ) ; } }
Creates an index on the field specified, if that index does not already exist.

<p>Prior to MongoDB 3.0 the dropDups option could be used with unique indexes allowing documents with duplicate values to be dropped
when building the index. Later versions of MongoDB will silently ignore this setting. </p>

@param keys    a document that contains pairs with the name of the field or fields to index and order of the index
@param options a document that controls the creation of the index.
@mongodb.driver.manual /administration/indexes-creation/ Index Creation Tutorials
Creates an index on the field specified if that index does not already exist .