FieldDataTermsQueryParser dumps the byte array in the log if a query parsing exception occurs #101

Closed
rendel opened this Issue Sep 22, 2016 · 2 comments

Projects

None yet

1 participant

@rendel
Contributor
rendel commented Sep 22, 2016

No description provided.

@rendel rendel added the bug label Sep 22, 2016
@rendel rendel self-assigned this Sep 22, 2016
@rendel
Contributor
rendel commented Sep 22, 2016

This can occur for example if an index pattern (or list of indices) is given as part of the request, but one of the index does not have the queried field. In this scenario, the shard throws a QueryParsingException, and the query is serialised into the log. However, the query should not serialise the byte array.

@rendel
Contributor
rendel commented Sep 23, 2016

The SearchService, in case of an exception, is serialising the request's source and log it along with the error message. Unfortunately, this is elasticsearch code and we can't modify the logic. However, the field data terms query parser should not throw an exception if a field does not exist, instead it should consider this valid and return an empty result set. This will partially solve the issue as we will not dump anymore the byte array whenever a field does not exist. The byte array will be serialised and dumped in the log only if there is an invalid query syntax (e.g., one query parameter missing).

@rendel rendel closed this Sep 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment