Table of Contents

Method SetWeight

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

SetWeight(string, int)

Sets the weight of a field for the text index.

public static IndexOptionsBuilder SetWeight(string name, int value)

Parameters

name string

The name of the field.

value int

The weight.

Returns

IndexOptionsBuilder

The builder (so method calls can be chained).