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

null_pointer_exception when filters aggregation is empty #41408

Closed
noamkush opened this issue Apr 22, 2019 · 2 comments · Fixed by #41459
Closed

null_pointer_exception when filters aggregation is empty #41408

noamkush opened this issue Apr 22, 2019 · 2 comments · Fixed by #41459

Comments

@noamkush
Copy link

Elasticsearch version: 7.0.0 (reproducible on official docker)

The following request:

GET _search
{
  "aggs": {
    "my_filters": {
      "filters": {}
    }
  }
}

Results in:

{
  "error": {
    "root_cause": [
      {
        "type": "null_pointer_exception",
        "reason": null
      }
    ],
    "type": "null_pointer_exception",
    "reason": null
  },
  "status": 500
}

Workaround is easy but it should probably be fixed.

@iverase iverase added the :Analytics/Aggregations Aggregations label Apr 22, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo

@polyfractal
Copy link
Contributor

I see where the NPE is happening, it's during our parsing of keyed vs unkeyed filters agg. Thanks for the bug report!

Fix should be easy, but it looks like the filters agg is using the old style parsing code. I'm going to take a whack at refactoring it into the static parsers in addition to fixing the NPE. PR to follow.

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

Successfully merging a pull request may close this issue.

4 participants