Method MetaSearchHighlights
| MongoDB CSharp Driver API Reference (original) (raw)
Namespace
Assembly
MongoDB.Driver.dll
MetaSearchHighlights(ProjectionDefinition, FieldDefinition)
Combines an existing projection with a search highlights projection.
public static ProjectionDefinition<TDocument> MetaSearchHighlights<TDocument>(this ProjectionDefinition<TDocument> projection, FieldDefinition<TDocument> field)
Parameters
projection
ProjectionDefinition
The projection.
field
FieldDefinition
The field.
Returns
A combined projection.
Type Parameters
TDocument
The type of the document.
MetaSearchHighlights(ProjectionDefinition, Expression<Func<TDocument, object>>)
Combines an existing projection with a search highlights projection.
public static ProjectionDefinition<TDocument> MetaSearchHighlights<TDocument>(this ProjectionDefinition<TDocument> projection, Expression<Func<TDocument, object>> field)
Parameters
projection
ProjectionDefinition
The projection.
field
Expression<Func<TDocument, object>>
The field.
Returns
A combined projection.
Type Parameters
TDocument
The type of the document.