@Override
    public boolean equals(Object o) {
        if (!(o instanceof QueryType other)) return false;
        if (other.type != this.type) return false;
        if (other.composite != this.composite) return false;
        if (other.tokenization != this.tokenization) return false;
        if (other.syntax != this.syntax) return false;
        return true;
    }
Throws IllegalArgumentException if the combination of options set in this are ot supported.
container-search/src/main/java/com/yahoo/search/query/QueryType.java