Class WeightedSpanTerm
java.lang.Object
org.apache.lucene.search.highlight.WeightedTerm
org.apache.lucene.search.highlight.WeightedSpanTerm
Lightweight class to hold term, weight, and positions used for scoring this term.
-
Constructor Summary
ConstructorsConstructorDescriptionWeightedSpanTerm(float weight, String term) WeightedSpanTerm(float weight, String term, boolean positionSensitive) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPositionSpans(List<PositionSpan> positionSpans) booleancheckPosition(int position) Checks to see if this term is valid atposition.booleanvoidsetPositionSensitive(boolean positionSensitive) Methods inherited from class org.apache.lucene.search.highlight.WeightedTerm
getTerm, getWeight, setTerm, setWeight
-
Constructor Details
-
WeightedSpanTerm
-
WeightedSpanTerm
-
-
Method Details
-
checkPosition
public boolean checkPosition(int position) Checks to see if this term is valid atposition.- Parameters:
position- to check against valid term positions- Returns:
- true iff this term is a hit at this position
-
addPositionSpans
-
isPositionSensitive
public boolean isPositionSensitive() -
setPositionSensitive
public void setPositionSensitive(boolean positionSensitive) -
getPositionSpans
-