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 intprivate static final intprivate final Directoryprivate static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidconsume(String fileName, long indexFP, BPIndexReorderer.LongConsumer consumer) private voidconsume(String fileName, BPIndexReorderer.LongConsumer consumer) private BPIndexReorderer.LongConsumerconsumer(int shift) private static longdecode(long fpDelta) private static longencode(long fpDelta) (package private) voidsortAndConsume(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
-