class LuceneGapFragmenter
extends org.apache.lucene.search.highlight.SimpleFragmenter
| Modifier and Type | Field and Description |
|---|---|
protected int |
fragOffset |
static int |
INCREMENT_THRESHOLD
When a gap in term positions is observed that is at least this big, treat
the gap as a fragment delimiter.
|
private org.apache.lucene.analysis.tokenattributes.OffsetAttribute |
offsetAtt |
private org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute |
posIncAtt |
| Constructor and Description |
|---|
LuceneGapFragmenter() |
LuceneGapFragmenter(int fragsize) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isNewFragment() |
void |
start(java.lang.String originalText,
org.apache.lucene.analysis.TokenStream tokenStream) |
public static final int INCREMENT_THRESHOLD
protected int fragOffset
private org.apache.lucene.analysis.tokenattributes.OffsetAttribute offsetAtt
private org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute posIncAtt
public LuceneGapFragmenter()
public LuceneGapFragmenter(int fragsize)
public void start(java.lang.String originalText,
org.apache.lucene.analysis.TokenStream tokenStream)
start in interface org.apache.lucene.search.highlight.Fragmenterstart in class org.apache.lucene.search.highlight.SimpleFragmenterpublic boolean isNewFragment()
isNewFragment in interface org.apache.lucene.search.highlight.FragmenterisNewFragment in class org.apache.lucene.search.highlight.SimpleFragmenter