private int initializeIterators(List<ConjunctionIdIterator> iterators, short[] sortedIndexes, int[] currentIds, int nextId) {
            int nCompleted = 0;
            int nIterators = iterators.size();
            for (int i = 0; i < nIterators; i++) {
                ConjunctionIdIterator iterator = iterators.get(i);
                if (iterator.next(nextId)) {
                    currentIds[i] = iterator.getConjunctionId();
                } else {
                    currentIds[i] = Integer.MAX_VALUE;
                    ++nCompleted;

                }
            }
            PrimitiveArraySorter.sort(sortedIndexes, (a, b) -> Integer.compare(currentIds[a], currentIds[b]));
            return nCompleted;
        }
Retrieves a list of hits for the given query.

@param query Specifies the boolean variables that are true.
@return List of hits
predicate-search/src/main/java/com/yahoo/search/predicate/index/conjunction/ConjunctionIndex.java