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

NoMethodError exception raised if search hits lack source document #46

Open
magnusbaeck opened this issue Jul 1, 2016 · 0 comments
Open

Comments

@magnusbaeck
Copy link
Contributor

As noted in https://discuss.elastic.co/t/error-undefined-method-for-nil-nilclass-in-logstash/54234, the elasticsearch input assumes that the hits in the search results contain the source document via the _source key, but this isn't true with a query like this:

{"fields": ["clientIP"], "query": { "match_all": {} } }

Such a query results in an "Error: undefined method `[]' for nil:NilClass" exception. I suppose the same might happen if the index's mappings are configured to not store the original document.

How should we deal with this situation? Use the available fields in lieu of the complete document?

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

No branches or pull requests

1 participant