public Document asDocument() {
      final List<Document> result = new ArrayList<>(disjunctions);
      result.add(mergeConjunctions(conjunctions));

      return result.size() == 1 ? result.get(0) : new Document(QueryOperators.OR, result);

    }
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