Revert changes made to IndexQueryParserService, fixed upstream meanwhile
This commit is contained in:
parent
8a87448758
commit
0cab4a25fb
|
@ -153,27 +153,6 @@ public class IndexQueryParserService extends AbstractIndexComponent {
|
|||
return indicesQueriesRegistry;
|
||||
}
|
||||
|
||||
public ParsedQuery parse(QueryBuilder<?> queryBuilder) {
|
||||
QueryShardContext context = cache.get();
|
||||
context.reset();
|
||||
context.parseFieldMatcher(parseFieldMatcher);
|
||||
try {
|
||||
return innerParse(context, queryBuilder);
|
||||
} catch (ParsingException e) {
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
throw new QueryShardException(context, "failed to create query: {}", e, queryBuilder);
|
||||
}
|
||||
}
|
||||
|
||||
private static ParsedQuery innerParse(QueryShardContext context, QueryBuilder<?> queryBuilder) throws IOException, QueryShardException {
|
||||
Query query = queryBuilder.toQuery(context);
|
||||
if (query == null) {
|
||||
query = Queries.newMatchNoDocsQuery();
|
||||
}
|
||||
return new ParsedQuery(query, context.copyNamedQueries());
|
||||
}
|
||||
|
||||
public ParsedQuery parse(BytesReference source) {
|
||||
QueryShardContext context = cache.get();
|
||||
XContentParser parser = null;
|
||||
|
@ -279,7 +258,7 @@ public class IndexQueryParserService extends AbstractIndexComponent {
|
|||
|
||||
public Query parseInnerQuery(QueryShardContext context) throws IOException {
|
||||
return toQuery(context.parseContext().parseInnerQueryBuilder(), context);
|
||||
}
|
||||
}
|
||||
|
||||
public ParsedQuery toQuery(QueryBuilder<?> queryBuilder) {
|
||||
QueryShardContext context = cache.get();
|
||||
|
|
Loading…
Reference in New Issue