Class BPIndexReorderer.IndexReorderingTask

    • Method Detail

      • compute

        protected void compute()
        Specified by:
        compute in class java.util.concurrent.RecursiveAction
      • 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 java.io.IOException
        Shuffle doc IDs across both partitions so that each partition has lower gaps between consecutive postings.
        Throws:
        java.io.IOException
      • swapDocsAndFreqs

        private void swapDocsAndFreqs​(int[] docs,
                                      int left,
                                      int right,
                                      BPIndexReorderer.ForwardIndex forwardIndex,
                                      int[] leftDocFreqs,
                                      int[] rightDocFreqs)
                               throws java.io.IOException
        Throws:
        java.io.IOException