protected void matchAutomata(Query query,int traceLevel) {
        List<PhraseMatcher.Phrase> matches = getPhraseMatcher().matchPhrases(query.getModel().getQueryTree().getRoot());
        if (matches == null || matches.size() == 0) return;
        for (Iterator<PhraseMatcher.Phrase> i = matches.iterator(); i.hasNext(); ) {
            PhraseMatcher.Phrase phrase = i.next();
            if (traceLevel >= 3)
                 query.trace("Semantic searcher automata matched " + phrase, false, 1);

            annotatePhrase(phrase, query, traceLevel);
        }
    }
Analyzes a query over this rule base

@param query the query to analyze
@param traceLevel the level of tracing to add to the query
@return the error caused by analyzing the query, or null if there was no error
        If there is an error, this query is destroyed (unusable)
container-search/src/main/java/com/yahoo/prelude/semantics/RuleBase.java