@Override
    public Result search(Query query, Execution execution) {
        List<ErrorMessage> errorMessages = validate(query, execution.context().getIndexFacts().newSession(query));
        if (!errorMessages.isEmpty()) {
            Result r = new Result(query);
            errorMessages.forEach(msg -> r.hits().addError(msg));
            return r;
        }
        return execution.search(query);
    }
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