private Query negate(final Query query) {
        // To enable SQL style functionality we have to tell Elastic to match all except the specified term.
        return QueryBuilders.bool()
                .should(MatchAllQuery.of(q -> q)._toQuery())
                .mustNot(query)
                .build()._toQuery();
    }
Creates an Elasticsearch query for a `keyword` field appropriate for the expression content
stroom-search/stroom-search-elastic/src/main/java/stroom/search/elastic/search/SearchExpressionQueryBuilder.java