Skip to content

Question about the behavior of Segment #2605

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

Open
xingtanzjr opened this issue Mar 22, 2025 · 1 comment
Open

Question about the behavior of Segment #2605

xingtanzjr opened this issue Mar 22, 2025 · 1 comment

Comments

@xingtanzjr
Copy link

I'm new to tantivy and want to learn some internal knowledge about that.

I have a question regarding Segment content when index building.

If the index only applies several insert() operation, I mean, the index won't be changed after build, if the content for one segment will be changed during the index build stage ?

Why I ask this question is becasue I'm trying to implement a customized Directory for tantivy, I just want to know whether a existed segment would change or not if I only have index.insert() operation during index build.

Thanks!

@fulmicoton
Copy link
Collaborator

I am not sure I understand your question.

Files themselves are never overridden.
A segment can only change in the sense that it will point to a different tombstone file. (a bitset marking the list of document that are not deleted). So a segment will not change if you have only insert operations.

It might be deleted however if it goes through a merge operation.

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

No branches or pull requests

2 participants