Class QueryType

java.lang.Object
com.yahoo.search.query.QueryType

public class QueryType extends Object
Detailed query type deciding how a query string is to be interpreted and processed.
Author:
bratseth
  • Field Details

  • Constructor Details

  • Method Details

    • getArgumentType

      public static QueryProfileType getArgumentType()
    • getType

      public Query.Type getType()
      Returns the overall type of this.
    • getComposite

      public QueryType.Composite getComposite()
      Returns the composite type terms should be collected as by default.
    • setComposite

      public QueryType setComposite(QueryType.Composite composite)
      Sets the composite type terms should be collected as by default.
      Returns:
      this for chaining
    • setComposite

      public QueryType setComposite(String composite)
      Sets the composite value from a string enum value. If the argument is null this does nothing.
    • getTokenization

      public QueryType.Tokenization getTokenization()
      Returns whether this should use internal tokenization, or delegate this to the linguistics component.
    • setTokenization

      public QueryType setTokenization(QueryType.Tokenization tokenization)
      Sets whether this should use internal tokenization, or delegate this to the linguistics component.
      Returns:
      this for chaining
    • setTokenization

      public QueryType setTokenization(String tokenization)
      Sets tokenization from a string enum value. If the argument is null this does nothing.
    • getSyntax

      public QueryType.Syntax getSyntax()
      Returns the query syntax used in this query.
    • setSyntax

      public QueryType setSyntax(QueryType.Syntax syntax)
      Sets the query syntax used in this query.
      Returns:
      this for chaining
    • setSyntax

      public QueryType setSyntax(String syntax)
      Sets the syntax from a string enum value. If the argument is null this does nothing.
    • isYqlDefault

      public boolean isYqlDefault()
      Returns whether this should be taken as the default 'grammar' settings when parsing YQL user queries. Default is false.
    • setYqlDefault

      public QueryType setYqlDefault(boolean isYqlDefault)
      Sets whether this query type should be used as the default 'grammar' settings when parsing YQL user queries.
      Returns:
      this for chaining
    • validate

      public void validate()
      Throws IllegalArgumentException if the combination of options set in this are ot supported.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • from

      public static QueryType from(Query.Type type)
    • from

      public static QueryType from(String typeName)
      Returns the query type given by this string, or the default type (WEAKAND) if the given type is null.