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

public class Query extends Object
A query: An array of the QueryTerms which searches the field we are calculating for,

In addition the sum of the term weights of all the query terms can be set explicitly. This allows us to model the matchWeight rank feature of a field as dependent of the weights of all the terms in the query.

Author:
bratseth
  • Constructor Details

    • Query

      public Query(String query)
    • Query

      public Query(QueryTerm[] terms)
      Creates a query with a list of query terms. The query terms are not, and must not be subsequently modified
  • Method Details

    • getTerms

      public QueryTerm[] getTerms()
      Returns the query terms we are calculating features of
    • getTotalTermWeight

      public int getTotalTermWeight()
      Returns the total term weight for this query. This is the sum of the weights of the terms if not set explicitly, or if set explicitly a higher number which also models a query which also has terms going to other indexes.
    • setTotalTermWeight

      public void setTotalTermWeight(int totalTermWeight)
    • getTotalSignificance

      public float getTotalSignificance()
      Returns the total term significance for this query. This is the sum of the significance of the terms if not set explicitly, or if set explicitly a higher number which also models a query which also has terms going to other indexes.
    • setTotalSignificance

      public void setTotalSignificance(float totalSignificance)
    • toString

      public String toString()
      Overrides:
      toString in class Object