HighlightOptions

HighlightOptions class

Provides the options which are used to extract a highlight (a block of text aroud found text in search scenarios).

public sealed class HighlightOptions

Constructors

Name Description
HighlightOptions(int) Initializes a new instance of the HighlightOptions class which is used to extract a fixed-length highlight.
HighlightOptions(int?, bool) Initializes a new instance of the HighlightOptions class which is used to extract a line-limited highlight.
HighlightOptions(int?, int) Initializes a new instance of the HighlightOptions class which is used to extract a highlight with the fixed word count.
HighlightOptions(int?, int?, bool) Initializes a new instance of the HighlightOptions class.

Properties

Name Description
IsLineLimited { get; } Gets value that indicates whether highlight extraction is limited by the start (or the end) of a text line.
MaxLength { get; } Gets a maximum text length.
WordCount { get; } Gets a maximum word count.

Remarks

An instance of HighlightOptions class is used as parameter in GetHighlight method. See the usage examples there.

Learn more:

See Also