java.lang.Object
com.yahoo.searchlib.ranking.features.fieldmatch.QueryTerm

public final class QueryTerm extends Object
A query term. Query terms are equal if they have the same term string.
Author:
bratseth
  • Constructor Details

    • QueryTerm

      public QueryTerm(String term)
    • QueryTerm

      public QueryTerm(String term, float connectedness)
  • Method Details

    • setTerm

      public void setTerm(String term)
    • getTerm

      public String getTerm()
    • getConnectedness

      public float getConnectedness()
      Returns how connected this term is to the previous term in the query. Default: 0.1. This is always a number between 0 (not connected at all) and 1 (virtually inseparable)
    • setConnectedness

      public void setConnectedness(float connectedness)
    • setWeight

      public void setWeight(int weight)
    • getWeight

      public int getWeight()
    • setSignificance

      public void setSignificance(float significance)
      The significance of this term: 1-term frequency
    • getSignificance

      public float getSignificance()
    • getExactness

      public float getExactness()
      The degree to which this is exactly the term the user specified (1), or a stemmed form (closer to 0)
    • hashCode

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

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object