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

Backport #12829 to 9.x #13013

Closed
wants to merge 2 commits into from
Closed

Backport #12829 to 9.x #13013

wants to merge 2 commits into from

Conversation

s1monw
Copy link
Member

@s1monw s1monw commented Jan 15, 2024

This is a backport PR for #12829. It add the optional ability to index parent fields in 9.x. While 9.x can still use index sorting with doc blocks without using a parent field this allows users to migrate to this mandatory feature earlier than 10.x. Only indices with min segment version 9.9 and older will be able to be configured with a parent field. These versions record if the index already has blocks which makes it safe to add the parent field after the fact.

Today index sorting will most likely break document blocks added with `IndexWriter#addDocuments(...)` and `#updateDocuments(...)` since the index sorter has no indication of what documents are part of a block. This change automatically adds a marker field to  parent documents if configured in `IWC`. These marker documents are optional unless document blocks are indexed and index sorting is configured. In this case indexing blocks will fail unless a parent field is configured. Index sorting will preserve document blocks during sort. Documents within a block not be reordered by the sorting algorithm and will sort along side their parent documents.

Relates to apache#12711
A parent field can now safely be added to indices that are created on
or after 9.9.x that have no doc blocks as well as newly created indices.
Adding a parent field to older indices is not permitted.

Relates to apache#12829
@s1monw s1monw requested review from jpountz and mikemccand January 15, 2024 12:43
@s1monw
Copy link
Member Author

s1monw commented Jan 15, 2024

ups I made a bad assumpion. I need to revisit this...

@s1monw
Copy link
Member Author

s1monw commented Jan 16, 2024

this doesn't work as I expected. I will close this one for now

@s1monw s1monw closed this Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant