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 Details

    • WeightedSpanTerm

      public WeightedSpanTerm(float weight, String term)
    • WeightedSpanTerm

      public WeightedSpanTerm(float weight, String term, boolean positionSensitive)
  • Method Details

    • checkPosition

      public boolean checkPosition(int position)
      Checks to see if this term is valid at position.
      Parameters:
      position - to check against valid term positions
      Returns:
      true iff this term is a hit at this position
    • addPositionSpans

      public void addPositionSpans(List<PositionSpan> positionSpans)
    • isPositionSensitive

      public boolean isPositionSensitive()
    • setPositionSensitive

      public void setPositionSensitive(boolean positionSensitive)
    • getPositionSpans

      public List<PositionSpan> getPositionSpans()