org.apache.lucene.search.highlight

Class TextFragment

public class TextFragment extends Object

Low-level class used to record information about a section of a document with a score.

Author: MAHarwood

Constructor Summary
TextFragment(StringBuffer markedUpText, int textStartPos, int fragNum)
Method Summary
booleanfollows(TextFragment fragment)
intgetFragNum()
floatgetScore()
voidmerge(TextFragment frag2)
StringtoString()

Constructor Detail

TextFragment

public TextFragment(StringBuffer markedUpText, int textStartPos, int fragNum)

Method Detail

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

getScore

public float getScore()

merge

public void merge(TextFragment frag2)

Parameters: frag2 Fragment to be merged into this one

toString

public String toString()
Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.