Hi all,
*EarlyTerminatingSortingCollector* in lucene takes N documents from each
segment. I have a case where i need to get the result from latest
segment alone will be enough to provide the results.
On finding N results in latest segment i will stop searching
What is your opinion on this ??
wi
Each segment in Lucene is its own little index, and you can get the
SegmentReader for it (use IndexReader.leaves() API from the full reader you
opened), pass that to IndexSearcher, and search it.
But be careful: the "last" segment is an unpredictable thing, because the
default merge policy merges