docs: @Override
      public synchronized BooleanQuery doQuery(Schema schema) {
          int oldMaxClauses= BooleanQuery.getMaxClauseCount();
          BooleanQuery.setMaxClauseCount(maxClauses);
  
          BooleanQuery.Builder builder = new BooleanQuery.Builder();
          must.forEach(condition -> builder.add(condition.query(schema), MUST));
          should.forEach(condition -> builder.add(condition.query(schema), SHOULD));
          not.forEach(condition -> builder.add(condition.query(schema), MUST_NOT));
          if (must.isEmpty() && should.isEmpty() && !not.isEmpty()) {
              logger.warn("Performing resource-intensive pure negation query {}", this);
              builder.add(new MatchAllDocsQuery(), FILTER);
          }
          BooleanQuery out=builder.build();
          BooleanQuery.setMaxClauseCount(oldMaxClauses);
          return out;
      }