I want to know why Lucene merge indexes ?
It's better to say , why does not Lucene merge all indexes to one index ? What is the advantage of this merging method ?
I want to know why Lucene merge indexes ?
It's better to say , why does not Lucene merge all indexes to one index ? What is the advantage of this merging method ?
In short, Lucene merges indexes to speed up searching. Definitely, one index performs better. But in practice it does not matter if you have one or 10 indexes when they are large enough. The time to search each index is order of magnitude higher than overhead induced by having several indexes.
This is purely practical decision - not to merge when it does not pay off. You can look into lucene source codes by yourself and get merging strategy that it uses.