Class WeightedSpanTerm
- java.lang.Object
-
- org.apache.lucene.search.highlight.WeightedTerm
-
- org.apache.lucene.search.highlight.WeightedSpanTerm
-
public class WeightedSpanTerm extends WeightedTerm
Lightweight class to hold term, weight, and positions used for scoring this term.
-
-
Constructor Summary
Constructors Constructor Description WeightedSpanTerm(float weight, java.lang.String term)
WeightedSpanTerm(float weight, java.lang.String term, boolean positionSensitive)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPositionSpans(java.util.List<PositionSpan> positionSpans)
boolean
checkPosition(int position)
Checks to see if this term is valid atposition
.java.util.List<PositionSpan>
getPositionSpans()
boolean
isPositionSensitive()
void
setPositionSensitive(boolean positionSensitive)
-
Methods inherited from class org.apache.lucene.search.highlight.WeightedTerm
getTerm, getWeight, setTerm, setWeight
-
-
-
-
Method Detail
-
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
public void addPositionSpans(java.util.List<PositionSpan> positionSpans)
-
isPositionSensitive
public boolean isPositionSensitive()
-
setPositionSensitive
public void setPositionSensitive(boolean positionSensitive)
-
getPositionSpans
public java.util.List<PositionSpan> getPositionSpans()
-
-