private void indexDocument(int docId, PredicateTreeAnnotations annotations) {
        int minFeature = annotations.minFeature;
        Preconditions.checkState(minFeature <= 0xFF,
                "Predicate is too complex. Expected min-feature less than %d, was %d.", 0xFF, minFeature);
        int intervalEnd = annotations.intervalEnd;
        Preconditions.checkState(intervalEnd <= Interval.MAX_INTERVAL_END,
                "Predicate is too complex. Expected min-feature less than %d, was %d.",
                Interval.MAX_INTERVAL_END, intervalEnd);
        highestIntervalEnd = Math.max(highestIntervalEnd, intervalEnd);
        intervalEndsBuilder.add((short) intervalEnd);
        minFeatureIndexBuilder.add((byte) minFeature);
        indexDocumentFeatures(docId, annotations.intervalMap);
        indexDocumentBoundsFeatures(docId, annotations.boundsMap);
        indexDocumentConjunctions(docId, annotations.featureConjunctions);
        aggregateZStarStatistics(annotations.intervalMap);
    }
Indexes a predicate with the given id.

@param docId     a 32-bit document id, returned in the Hit objects when the predicate matches
@param predicate the predicate to index
predicate-search/src/main/java/com/yahoo/search/predicate/PredicateIndexBuilder.java