Class FieldTermMatch
- java.lang.Object
-
- com.yahoo.searchlib.ranking.features.FieldTermMatch
-
@Beta public class FieldTermMatch extends java.lang.Object
Calculates the fieldTermMatch features- Author:
- bratseth
-
-
Constructor Summary
Constructors Constructor Description FieldTermMatch()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Features
compute(java.lang.String queryTerm, java.lang.String field)
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
-
-
-
Method Detail
-
compute
public static Features compute(java.lang.String queryTerm, java.lang.String field)
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
-
-