private boolean hasInclusiveClauses(final Query query) {
        if (query instanceof final BooleanQuery booleanQuery) {
            for (final BooleanClause booleanClause : booleanQuery.clauses()) {
                if (!Occur.MUST_NOT.equals(booleanClause.getOccur())) {
                    return true;
                }
                final Query subQuery = booleanClause.getQuery();
                if (hasInclusiveClauses(subQuery)) {
                    return true;
                }
            }
        }
        return false;
    }
Convert our query objects to a LUCENE query.
stroom-index/stroom-index-lucene980/src/main/java/stroom/index/lucene980/SearchExpressionQueryBuilder.java