Skip to content

[8.2] Less jank in after-key parsing for unmapped fields (#86359)#86402

Merged
elasticsearchmachine merged 1 commit intoelastic:8.2from
not-napoleon:backport/8.2/pr-86359
May 3, 2022
Merged

[8.2] Less jank in after-key parsing for unmapped fields (#86359)#86402
elasticsearchmachine merged 1 commit intoelastic:8.2from
not-napoleon:backport/8.2/pr-86359

Conversation

@not-napoleon
Copy link
Copy Markdown
Member

Backports the following commits to 8.2:

This addresses a bug where specifying an integer after key on an unmapped field for a terms composite source caused the shard to error.  

Resolves elastic#85928

The after-key parsing is pretty weird, and there are probably more bugs there. I did not take the opportunity to refactor the whole thing, but we should. This fixes the immediate problem by treating after keys as bytes refs when we don't have a field but think we want a keyword. We were already doing that if the user asked for a missing bucket, this just extends the behavior in the case that we don't.

Long term, the terms Composite source (and probably other Composite sources) should have specializations for unmapped fields. That's the direction we want to take aggs in general.
@not-napoleon not-napoleon added :Analytics/Aggregations Aggregations :Analytics/CompositeAggs >bug auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) labels May 3, 2022
@elasticmachine
Copy link
Copy Markdown
Collaborator

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

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

Labels

:Analytics/Aggregations Aggregations auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.2.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants