tantivy
tantivy copied to clipboard
Question about the behavior of Segment
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!
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.