Table of Contents

Method SetWeight

Namespace
MongoDB.Driver.Builders
Assembly
MongoDB.Driver.Legacy.dll

SetWeight<TMember>(Expression<Func<TDocument, TMember>>, int)

Sets the weight of a field for the text index.

public static IndexOptionsBuilder<TDocument> SetWeight<TMember>(Expression<Func<TDocument, TMember>> memberExpression, int value)

Parameters

memberExpression Expression<Func<TDocument, TMember>>

The member expression.

value int

The value.

Returns

IndexOptionsBuilder<TDocument>

The builder (so method calls can be chained).

Type Parameters

TMember

The type of the member.