Table of Contents

Class SearchHighlight

Namespace
MongoDB.Driver.Search
Assembly
MongoDB.Driver.dll

Represents a result of highlighting.

public sealed class SearchHighlight
Inheritance
SearchHighlight
Inherited Members

Constructors

SearchHighlight(string, double, SearchHighlightText[])

Initializes a new instance of the SearchHighlight class.

public SearchHighlight(string path, double score, SearchHighlightText[] texts)

Parameters

path string

document field which returned a match.

score double

Score assigned to this result.

texts SearchHighlightText[]

Objects containing the matching text and the surrounding text.

Properties

Path

Gets the document field which returned a match.

[BsonElement("path")]
public string Path { get; }

Property Value

string

Score

Gets the score assigned to this result.

[BsonElement("score")]
public double Score { get; }

Property Value

double

Texts

Gets one or more objects containing the matching text and the surrounding text (if any).

[BsonDefaultValue(null)]
[BsonElement("texts")]
public SearchHighlightText[] Texts { get; }

Property Value

SearchHighlightText[]