NOTE: the {@link Collector} detects sorted segments according to{@link SortingMergePolicy}, so it's best used in conjunction with it. Also, it collects up to a specified num docs from each segment, and therefore is mostly suitable for use in conjunction with collectors such as {@link TopDocsCollector}, and not e.g. {@link TotalHitCountCollector}.
NOTE: If you wrap a {@link TopDocsCollector} that sorts in the sameorder as the index order, the returned {@link TopDocsCollector#topDocs()}will be correct. However the total of {@link TopDocsCollector#getTotalHits() hit count} will be underestimated since not all matching documents will havebeen collected.
NOTE: This {@link Collector} uses {@link Sorter#getID()} to detectwhether a segment was sorted with the same {@link Sorter} as the one given in{@link #EarlyTerminatingSortingCollector(Collector,Sorter,int)}. This has two implications:
|
|
|
|
|
|