Method SearchMeta
| MongoDB CSharp Driver API Reference (original) (raw)
Namespace
Assembly
MongoDB.Driver.dll
SearchMeta(ProjectionDefinition, FieldDefinition)
Combines an existing projection with a search metadata projection.
public static ProjectionDefinition<TDocument> SearchMeta<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.
SearchMeta(ProjectionDefinition, Expression<Func<TDocument, object>>)
Combines an existing projection with a search metadata projection.
public static ProjectionDefinition<TDocument> SearchMeta<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.