@Override
    public ConvertToIndex equal(String name, boolean negate, @Nullable Object value) {
      if (document.containsKey(name)) {
        throw new IllegalArgumentException(
            String.format("Attribute %s is not unique: %s", name, document.get(name)));
      }
      document.put(name, value);
      return this;
    }
Builds bson with index definition. The difference with
{@link #convertToBson(Constraints.ConstraintHost)} is that this method fails on duplicate
fields. Currently only one index is allowed per field.
@see <a href="https://docs.mongodb.com/manual/indexes/">Mongo Indexes</a>
mongo/src/org/immutables/mongo/repository/internal/Support.java