org.apache.lucene.search.highlight
Class TextFragment
java.lang.Object
org.apache.lucene.search.highlight.TextFragment
public class TextFragment
- extends Object
Low-level class used to record information about a section of a document
with a score.
TextFragment
public TextFragment(CharSequence markedUpText,
int textStartPos,
int fragNum)
TextFragment
@Deprecated
public TextFragment(StringBuffer markedUpText,
int textStartPos,
int fragNum)
- Deprecated. Use
TextFragment(CharSequence, int, int)
instead.
This constructor will be removed in Lucene 4.0
getScore
public float getScore()
merge
public void merge(TextFragment frag2)
- Parameters:
frag2
- Fragment to be merged into this one
follows
public boolean follows(TextFragment fragment)
- Parameters:
fragment
-
- Returns:
- true if this fragment follows the one passed
getFragNum
public int getFragNum()
- Returns:
- the fragment sequence number
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.