org.apache.lucene.search.highlight
Class SpanGradientFormatter
- Formatter
public class SpanGradientFormatter
Formats text with different color intensity depending on the score of the
term using the span tag. GradientFormatter uses a bgcolor argument to the font tag which
doesn't work in Mozilla, thus this class.
- David Spencer dave@searchmorph.com
SpanGradientFormatter(float maxScore, String minForegroundColor, String maxForegroundColor, String minBackgroundColor, String maxBackgroundColor)
|
SpanGradientFormatter
public SpanGradientFormatter(float maxScore,
String minForegroundColor,
String maxForegroundColor,
String minBackgroundColor,
String maxBackgroundColor)
highlightTerm
public String highlightTerm(String originalText,
TokenGroup tokenGroup)
- highlightTerm in interface Formatter
- highlightTerm in interface GradientFormatter
originalText
- The section of text being considered for markuptokenGroup
- contains one or several overlapping Tokens along with
their scores and positions.
Copyright © 2000-2006 Apache Software Foundation. All Rights Reserved.