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 IntsRefprivate final BitSetprivate 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 booleancall()private static voidcomputeDocFreqs(IntsRef docs, BPIndexReorderer.ForwardIndex forwardIndex, int[] docFreqs) private booleanshuffle(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 static voidswapDocsAndFreqs(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 static void computeDocFreqs(IntsRef docs, BPIndexReorderer.ForwardIndex forwardIndex, int[] docFreqs) -
call
- Specified by:
callin interfaceCallable<Void>- Specified by:
callin 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 static void swapDocsAndFreqs(int[] docs, int left, int right, BPIndexReorderer.ForwardIndex forwardIndex, int[] leftDocFreqs, int[] rightDocFreqs) throws IOException - Throws:
IOException
-