Added a flattened sink for unmapped fields at RootObjectMapper in columnar index modes#155007
Draft
Kubik42 wants to merge 1 commit into
Draft
Added a flattened sink for unmapped fields at RootObjectMapper in columnar index modes#155007Kubik42 wants to merge 1 commit into
Kubik42 wants to merge 1 commit into
Conversation
Kubik42
commented
Jul 24, 2026
| /** | ||
| * Feature flag gating the implicit {@code _unmapped} sink that absorbs unmapped fields on strict columnar indices. | ||
| */ | ||
| public static final FeatureFlag UNMAPPED_FIELDS_FEATURE_FLAG = new FeatureFlag("flattened_unmapped_fields"); |
Contributor
Author
There was a problem hiding this comment.
Everything is gated behind a feature flag since I plan on splitting the work into multiple PRs for easier reviewing.
…umnar index modes
Kubik42
force-pushed
the
flattened-root-pr-1
branch
from
July 24, 2026 23:44
26be504 to
fe3290d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change is part of the work for https://github.com/elastic/logs-program/issues/149 and implements the beginning of https://github.com/elastic/logs-program/issues/54. What remains is the query, synthetic source, and block loader wiring.
Currently, all unmapped fields are matched with a corresponding
FieldMapper(decided by us or via dynamic templates). The problem with this approach is that it creates a field explosion: forNunmapped fields, we createNfields in Lucene.This PR addresses that by using a flattened field as a root-level sink for all unmapped fields. This works in unison with
subobjects: false(disabled in strictly columnar index modes and not updateable), which flattens the paths to all leaves. All mapped fields are still parsed the same way.Note, https://github.com/elastic/logs-program/issues/54 initially suggested to leverage the mapped sub-fields functionality of
FlattenedFieldMapper, but I believe this is the better option; explanation.