Fork me on GitHub
  • API

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    GradientFormatter
    SpanGradientFormatter
    Implements
    IFormatter
    Inherited Members
    GradientFormatter.m_fgRMin
    GradientFormatter.m_fgGMin
    GradientFormatter.m_fgBMin
    GradientFormatter.m_fgRMax
    GradientFormatter.m_fgGMax
    GradientFormatter.m_fgBMax
    GradientFormatter.m_highlightForeground
    GradientFormatter.m_bgRMin
    GradientFormatter.m_bgGMin
    GradientFormatter.m_bgBMin
    GradientFormatter.m_bgRMax
    GradientFormatter.m_bgGMax
    GradientFormatter.m_bgBMax
    GradientFormatter.m_highlightBackground
    GradientFormatter.GetForegroundColorString(float)
    GradientFormatter.GetBackgroundColorString(float)
    GradientFormatter.HexToInt32(string)
    GradientFormatter.HexToInt32(string, int, int)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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
    GradientFormatter

    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
    Overrides
    GradientFormatter.HighlightTerm(string, TokenGroup)
    See Also
    GradientFormatter

    Implements

    IFormatter

    See Also

    GradientFormatter
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.