Table of Contents

Class GeoHaystackSearchOptionsBuilder

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

A builder for the options of the GeoHaystackSearch command.

[Serializable]
[Obsolete("Use GeoHaystackSearchArgs instead.")]
[BsonSerializer(typeof(GeoHaystackSearchOptionsBuilder.Serializer))]
public class GeoHaystackSearchOptionsBuilder : BuilderBase, IConvertibleToBsonDocument, IMongoGeoHaystackSearchOptions
Inheritance
GeoHaystackSearchOptionsBuilder
Implements
Inherited Members
Extension Methods

Constructors

GeoHaystackSearchOptionsBuilder()

Initializes a new instance of the GeoHaystackSearchOptionsBuilder class.

public GeoHaystackSearchOptionsBuilder()

Methods

SetLimit(int)

Sets the maximum number of results to return.

public GeoHaystackSearchOptionsBuilder SetLimit(int value)

Parameters

value int

The maximum number of results to return.

Returns

GeoHaystackSearchOptionsBuilder

The builder (so method calls can be chained).

SetMaxDistance(double)

Sets the max distance.

public GeoHaystackSearchOptionsBuilder SetMaxDistance(double value)

Parameters

value double

The max distance.

Returns

GeoHaystackSearchOptionsBuilder

The builder (so method calls can be chained).

SetQuery(string, BsonValue)

Sets the query on the optional additional field.

public GeoHaystackSearchOptionsBuilder SetQuery(string additionalFieldName, BsonValue value)

Parameters

additionalFieldName string

The name of the additional field.

value BsonValue

The value fo the additional field.

Returns

GeoHaystackSearchOptionsBuilder

The builder (so method calls can be chained).

ToBsonDocument()

Returns the result of the builder as a BsonDocument.

public override BsonDocument ToBsonDocument()

Returns

BsonDocument

A BsonDocument.