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 IndexOptionsBuilder SetWeight(string name, int value)

Parameters

name string

The field name.

value int

The weight.

Returns

IndexOptionsBuilder

The builder (so method calls can be chained).