Skip to content

Search - fixed Nullpointer in significant text agg when field does not exist #64157

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

Merged
merged 1 commit into from
Oct 26, 2020

Conversation

markharwood
Copy link
Contributor

Backport (#64144)

Fixed Nullpointer in significant text agg - added test
Closes #64045

…t exist (elastic#64144)

Fixed Nullpointer in significant text agg - added test
Closes elastic#64045
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (:Analytics/Aggregations)

@elasticmachine elasticmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Oct 26, 2020
@markharwood markharwood merged commit 10e5902 into elastic:7.x Oct 26, 2020
@zetaab
Copy link

zetaab commented Mar 1, 2021

@markharwood this change will break our production currently when using 7.11.1. You fixed nullpointer issue, but at the same time you broke up another "feature" which was that you could still execute query if the field did not exist.

For instance when we query it says now

  "reason": "Field [q14016] does not exist, SignificantText requires an analyzed field"

So instead of just querying like we did before, now we need first list index mapping and check does the fields exists. Then execute another query where we search stuff if the field did exists. I have not found way to make it work without that.

{
  "query": {
    "exists": {
      "field": "q14016"
    }
  },
  "aggs": {
    "keywords": {
      "significant_text": {
        "field": "q14016"
      }
    }
  }
}

for instance this returns same result (error)

@markharwood
Copy link
Contributor Author

markharwood commented Mar 2, 2021

Thanks for reporting @zetaab I opened this issue #69809

For now using a query or parent filter aggregation with an exists query is a workaround

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Aggregations Aggregations backport >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants