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.
Implements
Inherited Members
Namespace: Lucene.Net.Search.Highlight
Assembly: Lucene.Net.Highlighter.dll
Syntax
public class SpanGradientFormatter : GradientFormatter, IFormatter
Constructors
SpanGradientFormatter(float, string, string, string, string)
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.
Declaration
public SpanGradientFormatter(float maxScore, string minForegroundColor, string maxForegroundColor, string minBackgroundColor, string maxBackgroundColor)
Parameters
| Type | Name | Description |
|---|---|---|
| float | maxScore | |
| string | minForegroundColor | |
| string | maxForegroundColor | |
| string | minBackgroundColor | |
| string | maxBackgroundColor |
See Also
Methods
HighlightTerm(string, TokenGroup)
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.
Declaration
public override string HighlightTerm(string originalText, TokenGroup tokenGroup)
Parameters
| Type | Name | Description |
|---|---|---|
| string | originalText | The section of text being considered for markup |
| TokenGroup | tokenGroup | contains one or several overlapping Tokens along with their scores and positions. |
Returns
| Type | Description |
|---|---|
| string |