What is the subReader used for in Lucene?
I don't know what the ReaderUtil.subReader
of Lucene does. Does anybody know what it does?
S开发者_如何学编程ee the class definition here: ReaderUtil.
Is it used to read each segment separately?
A Lucene index is divided into segments. In short, from each segment only a chunk of the index is read. And subreaders are the actual readers which work directly on a segment (one segment => one segment reader). And the IndexReader
, which clients use, is an aggregated implementation that uses the subreaders to perform the actual work.
精彩评论