docs: public void ensureIndex(String collName, String name, String fields, boolean unique, boolean dropDupsOnCreate) {
  
          BasicDBObject dbFields = parseFieldsString(fields);
  
          final BasicDBObjectBuilder keyOpts = new BasicDBObjectBuilder();
          if (name != null && name.length() != 0) {
              keyOpts.add("name", name);
          }
          if (unique) {
              keyOpts.add("unique", true);
              if (dropDupsOnCreate) {
                  keyOpts.add("dropDups", true);
              }
          }
  
          final DBCollection dbColl = getCollection(getCollName(collName));
  
          final BasicDBObject opts = (BasicDBObject) keyOpts.get();
          if (opts.isEmpty()) {
              LOGGER.debug("Ensuring index for " + dbColl.getName() + " with keys:" + dbFields);
              dbColl.createIndex(dbFields);
          } else {
              LOGGER.debug("Ensuring index for " + dbColl.getName() + " with keys:" + fields + " and opts:" + opts);
              dbColl.createIndex(dbFields, opts);
          }
      }