Module org.apache.lucene.misc
Package org.apache.lucene.misc.index
Class BPIndexReorderer.ForwardIndexSorter
java.lang.Object
org.apache.lucene.misc.index.BPIndexReorderer.ForwardIndexSorter
- Enclosing class:
- BPIndexReorderer
Use a LSB Radix Sorter to sort the (docID, termID) entries. We only need to compare docIds
because LSB Radix Sorter is stable and termIDs already sorted.
This sorter will require at least 16MB (BUFFER_BYTES
* HISTOGRAM_SIZE
)
RAM.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BPIndexReorderer.ForwardIndexSorter.Bucket[]
private static final int
private static final int
private final Directory
private static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
consume
(String fileName, long indexFP, BPIndexReorderer.LongConsumer consumer) private void
consume
(String fileName, BPIndexReorderer.LongConsumer consumer) private BPIndexReorderer.LongConsumer
consumer
(int shift) private static long
decode
(long fpDelta) private static long
encode
(long fpDelta) (package private) void
sortAndConsume
(String fileName, int maxDoc, BPIndexReorderer.LongConsumer consumer)
-
Field Details
-
HISTOGRAM_SIZE
private static final int HISTOGRAM_SIZE- See Also:
-
BUFFER_SIZE
private static final int BUFFER_SIZE- See Also:
-
BUFFER_BYTES
private static final int BUFFER_BYTES- See Also:
-
directory
-
buckets
-
-
Constructor Details
-
ForwardIndexSorter
ForwardIndexSorter(Directory directory)
-
-
Method Details
-
encode
private static long encode(long fpDelta) -
decode
private static long decode(long fpDelta) -
consume
- Throws:
IOException
-
consume
private void consume(String fileName, long indexFP, BPIndexReorderer.LongConsumer consumer) throws IOException - Throws:
IOException
-
consumer
-
sortAndConsume
void sortAndConsume(String fileName, int maxDoc, BPIndexReorderer.LongConsumer consumer) throws IOException - Throws:
IOException
-