org.apache.lucene.search.highlight

Class TokenGroup

public class TokenGroup extends Object

One, or several overlapping tokens, along with the score(s) and the scope of the original text

Author: MAHarwood

Method Summary
intgetEndOffset()
intgetNumTokens()
floatgetScore(int index)
intgetStartOffset()
TokengetToken(int index)
floatgetTotalScore()

Method Detail

getEndOffset

public int getEndOffset()

Returns: the end position in the original text

getNumTokens

public int getNumTokens()

Returns: the number of tokens in this group

getScore

public float getScore(int index)

Parameters: index a value between 0 and numTokens -1

Returns: the "n"th score

getStartOffset

public int getStartOffset()

Returns: the start position in the original text

getToken

public Token getToken(int index)

Parameters: index a value between 0 and numTokens -1

Returns: the "n"th token

getTotalScore

public float getTotalScore()

Returns: all tokens' scores summed up

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