Package org.apache.lucene.index
Class SegmentOrder
java.lang.Object
org.apache.lucene.index.SegmentOrder
Utility class to re-order segments within an IndexReader to assist in early termination.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SegmentOrderBuilds a SegmentSorter that will reorder segments based on a given numeric Sort, such that higher-sorting hits are more likely to be visited first, allowing early termination to more efficiently skip whole segments.abstract IndexReaderreorder(IndexReader reader) Produces a new view over an IndexReader by re-ordering the reader's segments
-
Constructor Details
-
SegmentOrder
public SegmentOrder()
-
-
Method Details
-
reorder
Produces a new view over an IndexReader by re-ordering the reader's segments- Throws:
IOException
-
fromSort
Builds a SegmentSorter that will reorder segments based on a given numeric Sort, such that higher-sorting hits are more likely to be visited first, allowing early termination to more efficiently skip whole segments. If the primary SortField of the Sort is not numeric then the returned SegmentSorter will have no effect.
-