Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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
Assignees
Labels

Comments

@rendel
Copy link
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
Copy link
Contributor Author

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
Copy link
Contributor Author

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant