Method MetaScore

| MongoDB CSharp Driver API Reference (original) (raw)

Namespace

MongoDB.Driver

Assembly

MongoDB.Driver.dll

MetaScore(ProjectionDefinition, FieldDefinition)

Combines an existing projection with a meta score projection. This projection will retrieve any kind of score metadata i.e. searchScore, VectorSearchScore or textScore.

public static ProjectionDefinition<TDocument> MetaScore<TDocument>(this ProjectionDefinition<TDocument> projection, FieldDefinition<TDocument> field)

Parameters

projection ProjectionDefinition

The projection.

field FieldDefinition

The field.

Returns

ProjectionDefinition

A combined projection.

Type Parameters

TDocument

The type of the document.

MetaScore(ProjectionDefinition, Expression<Func<TDocument, object>>)

Combines an existing projection with a meta score projection. This projection will retrieve any kind of score metadata i.e. searchScore, VectorSearchScore or textScore.

public static ProjectionDefinition<TDocument> MetaScore<TDocument>(this ProjectionDefinition<TDocument> projection, Expression<Func<TDocument, object>> field)

Parameters

projection ProjectionDefinition

The projection.

field Expression<Func<TDocument, object>>

The field.

Returns

ProjectionDefinition

A combined projection.

Type Parameters

TDocument

The type of the document.