Skip to content

Move parent field from DWPT to IndexingChain#15960

Open
Tim-Brooks wants to merge 4 commits intoapache:mainfrom
Tim-Brooks:parent_field_to_indexing_chain
Open

Move parent field from DWPT to IndexingChain#15960
Tim-Brooks wants to merge 4 commits intoapache:mainfrom
Tim-Brooks:parent_field_to_indexing_chain

Conversation

@Tim-Brooks
Copy link
Copy Markdown
Contributor

The parent field (used for block indexing) was previously managed by
DWPT: it created a ReservedField wrapper, injected the field into the
last document's iterator via addParentField(), and relied on a
delegating ReservedField class to guard the field name from external
use.

Move ownership of the parent field into IndexingChain, where field
schemas and processing already live. The parent field and its PerField
are created once in the IndexingChain constructor, and processDocument
handles it directly in both passes when lastDocInBlock is true.
Reserved field detection uses a simple identity check (pf == parentPf)
instead of the ReservedField wrapper class.

This removes ~90 lines of boilerplate (ReservedField, addParentField
iterator, reserved boolean on PerField) and avoids per-document iterator
allocation and redundant schema re-validation for the parent field.

@github-actions github-actions bot added this to the 10.5.0 milestone Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant