Table of Contents

Class GeoHaystackSearchOptionsBuilder<TDocument>

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<TDocument> : BuilderBase, IConvertibleToBsonDocument, IMongoGeoHaystackSearchOptions

Type Parameters

TDocument

The type of the document.

Inheritance
GeoHaystackSearchOptionsBuilder<TDocument>
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<TDocument> SetLimit(int value)

Parameters

value int

The maximum number of results to return.

Returns

GeoHaystackSearchOptionsBuilder<TDocument>

The builder (so method calls can be chained).

SetMaxDistance(double)

Sets the max distance.

public GeoHaystackSearchOptionsBuilder<TDocument> SetMaxDistance(double value)

Parameters

value double

The max distance.

Returns

GeoHaystackSearchOptionsBuilder<TDocument>

The builder (so method calls can be chained).

SetQuery<TMember>(Expression<Func<TDocument, TMember>>, TMember)

Sets the query on the optional additional field.

public GeoHaystackSearchOptionsBuilder<TDocument> SetQuery<TMember>(Expression<Func<TDocument, TMember>> memberExpression, TMember value)

Parameters

memberExpression Expression<Func<TDocument, TMember>>

The member expression.

value TMember

The value fo the additional field.

Returns

GeoHaystackSearchOptionsBuilder<TDocument>

The builder (so method calls can be chained).

Type Parameters

TMember

The type of the member.

ToBsonDocument()

Converts this object to a BsonDocument.

public override BsonDocument ToBsonDocument()

Returns

BsonDocument

A BsonDocument.