Table of Contents

Method GeoHaystackSearchAs

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

GeoHaystackSearchAs<TDocument>(double, double, IMongoGeoHaystackSearchOptions)

Runs a geoHaystack search command on this collection.

[Obsolete("Use the overload of GeoHaystackSearchAs that has a GeoHaystackSearchArgs parameter instead.")]
public virtual GeoHaystackSearchResult<TDocument> GeoHaystackSearchAs<TDocument>(double x, double y, IMongoGeoHaystackSearchOptions options)

Parameters

x double

The x coordinate of the starting location.

y double

The y coordinate of the starting location.

options IMongoGeoHaystackSearchOptions

The options for the geoHaystack search (null if none).

Returns

GeoHaystackSearchResult<TDocument>

A GeoNearResult<TDocument>.

Type Parameters

TDocument

The type of the found documents.

GeoHaystackSearchAs<TDocument>(GeoHaystackSearchArgs)

Runs a geoHaystack search command on this collection.

[Obsolete("GeoHaystack indexes were deprecated in server version 4.4.")]
public virtual GeoHaystackSearchResult<TDocument> GeoHaystackSearchAs<TDocument>(GeoHaystackSearchArgs args)

Parameters

args GeoHaystackSearchArgs

The args.

Returns

GeoHaystackSearchResult<TDocument>

A GeoNearResult<TDocument>.

Type Parameters

TDocument

The type of the found documents.

GeoHaystackSearchAs(Type, double, double, IMongoGeoHaystackSearchOptions)

Runs a geoHaystack search command on this collection.

[Obsolete("Use the overload of GeoHaystackSearchAs that has a GeoHaystackSearchArgs parameter instead.")]
public virtual GeoHaystackSearchResult GeoHaystackSearchAs(Type documentType, double x, double y, IMongoGeoHaystackSearchOptions options)

Parameters

documentType Type

The type to deserialize the documents as.

x double

The x coordinate of the starting location.

y double

The y coordinate of the starting location.

options IMongoGeoHaystackSearchOptions

The options for the geoHaystack search (null if none).

Returns

GeoHaystackSearchResult

A GeoNearResult<TDocument>.

GeoHaystackSearchAs(Type, GeoHaystackSearchArgs)

Runs a geoHaystack search command on this collection.

[Obsolete("GeoHaystack indexes were deprecated in server version 4.4.")]
public virtual GeoHaystackSearchResult GeoHaystackSearchAs(Type documentType, GeoHaystackSearchArgs args)

Parameters

documentType Type

The type to deserialize the documents as.

args GeoHaystackSearchArgs

The args.

Returns

GeoHaystackSearchResult

A GeoNearResult<TDocument>.