private void visit(PredicateQueryItem item) {
            Index index = getIndexFromUnionOfDocumentTypes(item.getIndexName());
            if (!index.isPredicate()) {
                errorMessages.add(ErrorMessage.createIllegalQuery(String.format("Index '%s' is not a predicate attribute.", index.getName())));
            }
            for (PredicateQueryItem.RangeEntry entry : item.getRangeFeatures()) {
                long value = entry.getValue();
                if (value < index.getPredicateLowerBound() || value > index.getPredicateUpperBound()) {
                    errorMessages.add(
                            ErrorMessage.createIllegalQuery(String.format("%s=%d outside configured predicate bounds.", entry.getKey(), value)));
                }
            }
        }
Checks that predicate queries don't use values outside the defined upper/lower bounds.

@author Magnar Nedland
container-search/src/main/java/com/yahoo/prelude/searcher/ValidatePredicateSearcher.java