public PredicateIndex build() {
        return new PredicateIndex(
                config,
                Ints.toArray(seenIds),
                Bytes.toArray(minFeatureIndexBuilder),
                Shorts.toArray(intervalEndsBuilder),
                highestIntervalEnd,
                intervalIndexBuilder.build(),
                boundsIndexBuilder.build(),
                conjunctionIntervalIndexBuilder.build(),
                intervalStoreBuilder.build(),
                conjunctionIndexBuilder.build(),
                Ints.toArray(zeroConstraintDocuments)
        );
    }
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