private QueryTree parse() {
        try {
            Parser parser = ParserFactory.newInstance(type, ParserEnvironment.fromExecutionContext(execution.context()));
            return parser.parse(Parsable.fromQueryModel(this));
        }
        catch (IllegalArgumentException e) {
            throw new IllegalInputException("Failed parsing query", e);
        }
    }
Returns the query as an object structure.

@param parse if true, the query string is parsed into a query tree if it is currently null,
             if false, the query string is ignored and the query tree is initialized to
             an empty root if it's currently null.
container-search/src/main/java/com/yahoo/search/query/Model.java