public Stream<Hit> search(PredicateQuery query) {
            ArrayList<PostingList> postingLists = new ArrayList<>();
            for (PredicateQuery.Feature feature : query.getFeatures()) {
                addIntervalPostingList(feature.featureHash, feature.subqueryBitmap, postingLists);
            }
            for (PredicateQuery.RangeFeature feature : query.getRangeFeatures()) {
                expander.expand(
                        feature.key,
                        feature.value,
                        featureHash -> addIntervalPostingList(featureHash, feature.subqueryBitmap, postingLists),
                        (featureHash, value) -> addBoundsPostingList(featureHash, value, feature.subqueryBitmap, postingLists));
            }
            addCompressedZStarPostingList(postingLists);
            addConjunctionPostingLists(query, postingLists);
            addZeroConstraintPostingList(postingLists);

            CachedPostingListCounter counter = postingListCounter.get();
            counter.registerUsage(postingLists);
            counter.countPostingListsPerDocument(postingLists, nPostingListsForDocument);
            return new PredicateSearch(
                    postingLists, nPostingListsForDocument, minFeatureIndex, intervalEnds, highestIntervalEnd).stream()
                    // Map to external id. Note that internal id for first document is 1.
                    .map(hit -> new Hit(internalToExternalIdMapping[hit.getDocId()], hit.getSubquery()));
        }
Retrieves a stream of hits for the given query.

@param query Specifies the boolean variables that are true.
@return A stream of hits.
predicate-search/src/main/java/com/yahoo/search/predicate/PredicateIndex.java