org.apache.lucene.search.highlight
Class WeightedSpanTerm

java.lang.Object
  extended by org.apache.lucene.search.highlight.WeightedTerm
      extended by 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
WeightedSpanTerm(float weight, String term)
           
WeightedSpanTerm(float weight, String term, boolean positionSensitive)
           
 
Method Summary
 void addPositionSpans(List<org.apache.lucene.search.highlight.PositionSpan> positionSpans)
           
 boolean checkPosition(int position)
          Checks to see if this term is valid at position.
 List<org.apache.lucene.search.highlight.PositionSpan> getPositionSpans()
           
 boolean isPositionSensitive()
           
 void setPositionSensitive(boolean positionSensitive)
           
 
Methods inherited from class org.apache.lucene.search.highlight.WeightedTerm
getTerm, getWeight, setTerm, setWeight
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WeightedSpanTerm

public WeightedSpanTerm(float weight,
                        String term)
Parameters:
weight -
term -

WeightedSpanTerm

public WeightedSpanTerm(float weight,
                        String term,
                        boolean positionSensitive)
Parameters:
weight -
term -
positionSensitive -
Method Detail

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<org.apache.lucene.search.highlight.PositionSpan> positionSpans)

isPositionSensitive

public boolean isPositionSensitive()

setPositionSensitive

public void setPositionSensitive(boolean positionSensitive)

getPositionSpans

public List<org.apache.lucene.search.highlight.PositionSpan> getPositionSpans()


Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.