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

Write an example explaining Lucene's segmented architecture #11

Open
msfroh opened this issue Mar 22, 2024 · 0 comments
Open

Write an example explaining Lucene's segmented architecture #11

msfroh opened this issue Mar 22, 2024 · 0 comments
Labels
good first issue Good for newcomers

Comments

@msfroh
Copy link
Owner

msfroh commented Mar 22, 2024

While I've touched on it in several existing examples, I don't think I've written anything focused on Lucene's segmented architecture.

I think a rough outline would be something like:

  1. Add some documents, open reader -- how many segments? 1.
  2. Add some more documents, open reader -- now we have 2 segments.
  3. How do deletes work? Delete a doc or two from segment 1. Reopen reader (applying deletes). You should still see 2 segments, but now the first segment has a live docs file associated with the current commit generation.
  4. Updating documents? Delete document from an old segment and add it in a new segment.
  5. Merging - Create a manual MergeSpecification with a couple of OneMerges. Maybe one of them merges two segments while another does a singleton merge to expunge deletes.
  6. Merge policies - Explain how merges are usually managed by merge policy, maybe with a brief explanation of TieredMergePolicy.
@msfroh msfroh added the good first issue Good for newcomers label Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant