Table of Contents

Class GeoHaystackSearchOptions<TDocument>

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

A builder for the options of the GeoHaystackSearch command.

[Obsolete("Use GeoHaystackSearchArgs instead.")]
public static class GeoHaystackSearchOptions<TDocument>

Type Parameters

TDocument

The type of the document.

Inheritance
GeoHaystackSearchOptions<TDocument>
Inherited Members

Properties

Null

Gets a null value with a type of IMongoGeoHaystackSearchOptions.

public static IMongoGeoHaystackSearchOptions Null { get; }

Property Value

IMongoGeoHaystackSearchOptions

Methods

SetLimit(int)

Sets the maximum number of results to return.

public static 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 static 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 static 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 member type.