public static QueryType from(Query.Type type) {
        return switch (type) {
            case ADVANCED ->     new QueryType(type, Composite.and,     Tokenization.internal,    Syntax.advanced);
            case ALL ->          new QueryType(type, Composite.and,     Tokenization.internal,    Syntax.simple);
            case ANY ->          new QueryType(type, Composite.or,      Tokenization.internal,    Syntax.simple);
            case LINGUISTICS ->  new QueryType(type, Composite.weakAnd, Tokenization.linguistics, Syntax.none);
            case PHRASE ->       new QueryType(type, Composite.phrase,  Tokenization.internal,    Syntax.none);
            case PROGRAMMATIC -> new QueryType(type, Composite.and,     Tokenization.internal,    Syntax.programmatic);
            case SELECT ->       new QueryType(type, Composite.and,     Tokenization.internal,    Syntax.json);
            case TOKENIZE ->     new QueryType(type, Composite.weakAnd, Tokenization.internal,    Syntax.none);
            case WEAKAND ->      new QueryType(type, Composite.weakAnd, Tokenization.internal,    Syntax.simple);
            case WEB ->          new QueryType(type, Composite.and,     Tokenization.internal,    Syntax.web);
            case YQL ->          new QueryType(type, Composite.and,     Tokenization.internal,    Syntax.yql);
        };
    }
Throws IllegalArgumentException if the combination of options set in this are ot supported.
container-search/src/main/java/com/yahoo/search/query/QueryType.java