Skip to content

Avoid immense term error in metrics metadata fields#1835

Merged
gbanasiak merged 4 commits intoelastic:masterfrom
gbanasiak:fix-immense-term
Mar 13, 2024
Merged

Avoid immense term error in metrics metadata fields#1835
gbanasiak merged 4 commits intoelastic:masterfrom
gbanasiak:fix-immense-term

Conversation

@gbanasiak
Copy link
Copy Markdown
Contributor

@gbanasiak gbanasiak commented Feb 28, 2024

To avoid immense term error in metrics metadata fields:

  • meta.error-description field mapping changes from keyword to wildcard which fits this type of content better while still allowing the search,
  • remaining dynamically mapped text fields get "ignore_above": 8191 parameter to prevent immense term error in the worst case of error message being composed entirely of UTF-8 characters (see doc),
  • meta.error-description field generated in BulkIndex runner gets limited to 5 unique errors only for better log readability - currently, in the worst case the field is concatenated from errors from all bulk documents.

Addresses #1834.

@gbanasiak gbanasiak requested a review from a team February 28, 2024 19:13
Copy link
Copy Markdown
Member

@inqueue inqueue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

"meta": {
"properties": {
"error-description": {
"type": "wildcard"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wildcard mapping type is a wise choice for our use case. error-description can be quite large and does not need the tokenization a text mapping type would bring.

@gbanasiak gbanasiak merged commit e4d9b3c into elastic:master Mar 13, 2024
@gbanasiak gbanasiak deleted the fix-immense-term branch March 13, 2024 16:04
@gareth-ellis gareth-ellis added this to the 2.11 milestone May 23, 2024
@gareth-ellis gareth-ellis added the bug Something's wrong label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something's wrong

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants