private Result calculateAndSetSignificance(Query query, Execution execution) {
        try {
            var significanceModel = getSignificanceModelFromQueryLanguage(query);
            log.log(Level.FINE, () -> "Got model for language %s: %s"
                    .formatted(query.getModel().getParsingLanguage(), significanceModel.getId()));

            setIDF(query.getModel().getQueryTree().getRoot(), significanceModel);

            return execution.search(query);
        } catch (IllegalArgumentException e) {
            var result = new Result(query);
            result.hits().addError(
                    ErrorMessage.createIllegalQuery(e.getMessage()));
            return result;
        }
    }
Sets significance values on word items in the query tree.

@author Marius Arhaug
container-search/src/main/java/com/yahoo/search/significance/SignificanceSearcher.java