protected final FluentFuture<Void> doIndex(
        final Constraints.Constraint fields,
        final IndexOptions options) {

      return submit(new Callable<Void>() {
        @Override
        public Void call() {
          collection().createIndex(convertToIndex(fields), options);
          return null;
        }
      });
    }
Codec used for current collection type.
@return registry
mongo/src/org/immutables/mongo/repository/Repositories.java