Class FieldTermMatch
java.lang.Object
com.yahoo.searchlib.ranking.features.FieldTermMatch
Calculates the fieldTermMatch features
- Author:
- bratseth
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Features
Computes the fieldTermMatch features:firstPosition
- the position of the first occurrence of this query term in this index fieldoccurrences
- the position of the first occurrence of this query term in this index field
-
Constructor Details
-
FieldTermMatch
public FieldTermMatch()
-
-
Method Details
-
compute
Computes the fieldTermMatch features:firstPosition
- the position of the first occurrence of this query term in this index fieldoccurrences
- the position of the first occurrence of this query term in this index field
- Parameters:
queryTerm
- the term to return these features forfield
- the field value to compute over, assumed to be a space-separated string of tokens- Returns:
- a features object containing the two values described above
-