public QueryType setSyntax(String syntax) {
        if (syntax == null) return this;
        this.syntax = Syntax.valueOf(syntax);
        return this;
    }
Sets the syntax from a string enum value. If the argument is null this does nothing.
container-search/src/main/java/com/yahoo/search/query/QueryType.java