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

Avoid resolving metadata fields twice in FetchFieldsPhase #108204

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

javanna
Copy link
Member

@javanna javanna commented May 2, 2024

We have moved fetching of metadata fields to FetchFieldsPhase with #106325 . For backwards compatibility, metadata fields requested via stored_fields are returned even when they match a wildcard expression, which differs from how patterns are resolved via fields, where patterns never match metadata fields. Instead of calling getMatchingFieldNames and getFieldType twice per metadata field, this distinction is now included in FieldFetcher#create via two predicates that control which fields should be returned depending on the field fetcher instance being created.

This is take 2 of #107474 which got in but got reverted due to test failures.

We have moved fetching of metadata fields to FetchFieldsPhase with elastic#106325 .
For backwards compatibility, metadata fields requested via `stored_fields` are returned
even when they match a wildcard expression, which differs from how patterns are resolved
via `fields`. Instead of calling getMatchingFieldNames and getFieldType twice per field,
this distinction is now included in FieldFetcher#create via a predicate
@javanna javanna changed the title Refactoring/field fetcher pattern predicate 2 Avoid resolving metadata fields twice in FetchFieldsPhase May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants