public SearchExpressionQuery buildQuery(final ExpressionOperator expression) {
        Set<String> terms = Collections.emptySet();
        Query query = null;
        if (expression != null) {
            BooleanQuery.setMaxClauseCount(maxBooleanClauseCount);

            // Build a query.
            terms = new HashSet<>();
            query = getQuery(expression, terms);
        }

        // Ensure we at least match all.
        if (query == null) {
            query = new MatchAllDocsQuery();
        }
        return new SearchExpressionQuery(query, terms);
    }
Convert our query objects to a LUCENE query.
stroom-search/stroom-search-solr/src/main/java/stroom/search/solr/search/SearchExpressionQueryBuilder.java