Table of Contents

Method GeoSpatialHaystack

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

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

Sets the key name to create a geospatial haystack index on.

[Obsolete("GeoHaystack indexes were deprecated in server version 4.4.")]
public static IndexKeysBuilder<TDocument> GeoSpatialHaystack<TMember>(Expression<Func<TDocument, TMember>> memberExpression)

Parameters

memberExpression Expression<Func<TDocument, TMember>>

The member expression.

Returns

IndexKeysBuilder<TDocument>

The builder (so method calls can be chained).

Type Parameters

TMember

The type of the member.

GeoSpatialHaystack<TMember, TAdditionalMember>(Expression<Func<TDocument, TMember>>, Expression<Func<TDocument, TAdditionalMember>>)

Sets the key name and additional field name to create a geospatial haystack index on.

[Obsolete("GeoHaystack indexes were deprecated in server version 4.4.")]
public static IndexKeysBuilder<TDocument> GeoSpatialHaystack<TMember, TAdditionalMember>(Expression<Func<TDocument, TMember>> memberExpression, Expression<Func<TDocument, TAdditionalMember>> additionalMemberExpression)

Parameters

memberExpression Expression<Func<TDocument, TMember>>

The member expression.

additionalMemberExpression Expression<Func<TDocument, TAdditionalMember>>

The additional member expression.

Returns

IndexKeysBuilder<TDocument>

The builder (so method calls can be chained).

Type Parameters

TMember

The type of the member.

TAdditionalMember

The type of the additional member.