Module org.apache.lucene.misc
Package org.apache.lucene.misc.index
Class BPIndexReorderer.IndexReorderingTask
java.lang.Object
org.apache.lucene.misc.index.BPIndexReorderer.BaseRecursiveAction
org.apache.lucene.misc.index.BPIndexReorderer.IndexReorderingTask
- Enclosing class:
BPIndexReorderer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final float[]
private final IntsRef
private final BitSet
private final CloseableThreadLocal
<BPIndexReorderer.PerThreadState> Fields inherited from class org.apache.lucene.misc.index.BPIndexReorderer.BaseRecursiveAction
depth, executor
-
Constructor Summary
ConstructorsConstructorDescriptionIndexReorderingTask
(IntsRef docIDs, float[] biases, CloseableThreadLocal<BPIndexReorderer.PerThreadState> threadLocal, BitSet parents, TaskExecutor executor, int depth) -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
call()
private void
computeDocFreqs
(IntsRef docs, BPIndexReorderer.ForwardIndex forwardIndex, int[] docFreqs) private boolean
shuffle
(BPIndexReorderer.ForwardIndex forwardIndex, IntsRef docIDs, int midPoint, int[] leftDocFreqs, int[] rightDocFreqs, float[] biases, BitSet parents, int iter) Shuffle doc IDs across both partitions so that each partition has lower gaps between consecutive postings.private void
swapDocsAndFreqs
(int[] docs, int left, int right, BPIndexReorderer.ForwardIndex forwardIndex, int[] leftDocFreqs, int[] rightDocFreqs) Methods inherited from class org.apache.lucene.misc.index.BPIndexReorderer.BaseRecursiveAction
invokeAll, shouldFork
-
Field Details
-
docIDs
-
biases
private final float[] biases -
threadLocal
-
parents
-
-
Constructor Details
-
IndexReorderingTask
IndexReorderingTask(IntsRef docIDs, float[] biases, CloseableThreadLocal<BPIndexReorderer.PerThreadState> threadLocal, BitSet parents, TaskExecutor executor, int depth)
-
-
Method Details
-
computeDocFreqs
private void computeDocFreqs(IntsRef docs, BPIndexReorderer.ForwardIndex forwardIndex, int[] docFreqs) -
call
- Specified by:
call
in interfaceCallable<Void>
- Specified by:
call
in classBPIndexReorderer.BaseRecursiveAction
-
assertParentStructure
private boolean assertParentStructure() -
shuffle
private boolean shuffle(BPIndexReorderer.ForwardIndex forwardIndex, IntsRef docIDs, int midPoint, int[] leftDocFreqs, int[] rightDocFreqs, float[] biases, BitSet parents, int iter) throws IOException Shuffle doc IDs across both partitions so that each partition has lower gaps between consecutive postings.- Throws:
IOException
-
swapDocsAndFreqs
private void swapDocsAndFreqs(int[] docs, int left, int right, BPIndexReorderer.ForwardIndex forwardIndex, int[] leftDocFreqs, int[] rightDocFreqs) throws IOException - Throws:
IOException
-