Class Query
- java.lang.Object
-
- com.yahoo.searchlib.ranking.features.fieldmatch.Query
-
public class Query extends java.lang.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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QueryTerm[]
getTerms()
Returns the query terms we are calculating features offloat
getTotalSignificance()
Returns the total term significance for this query.int
getTotalTermWeight()
Returns the total term weight for this query.void
setTotalSignificance(float totalSignificance)
void
setTotalTermWeight(int totalTermWeight)
java.lang.String
toString()
-
-
-
Constructor Detail
-
Query
public Query(java.lang.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 Detail
-
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 java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-