Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Readability.
Browse files Browse the repository at this point in the history
afoucret committed Oct 18, 2024
1 parent 5117b06 commit a5ed138
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
package org.elasticsearch.xpack.kql.parser;

import org.antlr.v4.runtime.ParserRuleContext;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.MatchAllQueryBuilder;
import org.elasticsearch.index.query.MatchNoneQueryBuilder;
import org.elasticsearch.index.query.QueryBuilder;
@@ -42,8 +41,7 @@ public QueryBuilder visitBooleanQuery(KqlBaseParser.BooleanQueryContext ctx) {

@Override
public QueryBuilder visitNotQuery(KqlBaseParser.NotQueryContext ctx) {
BoolQueryBuilder builder = QueryBuilders.boolQuery();
return builder.mustNot(ParserUtils.typedParsing(this, ctx.simpleQuery(), QueryBuilder.class));
return QueryBuilders.boolQuery().mustNot(ParserUtils.typedParsing(this, ctx.simpleQuery(), QueryBuilder.class));
}

@Override

0 comments on commit a5ed138

Please sign in to comment.