Table of Contents

Class GeoHaystackSearchArgs

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

Represents the arguments to the GeoHaystackSearch method.

[Obsolete("GeoHaystack indexes were deprecated in server version 4.4.")]
public class GeoHaystackSearchArgs
Inheritance
GeoHaystackSearchArgs
Inherited Members
Extension Methods

Properties

AdditionalFieldName

Gets or sets the name of the additional field.

public string AdditionalFieldName { get; set; }

Property Value

string

AdditionalFieldValue

Gets or sets the additional field value.

public BsonValue AdditionalFieldValue { get; set; }

Property Value

BsonValue

Limit

Gets or sets the limit.

public int? Limit { get; set; }

Property Value

int?

MaxDistance

Gets or sets the max distance.

public double? MaxDistance { get; set; }

Property Value

double?

MaxTime

Gets or sets the max time.

public TimeSpan? MaxTime { get; set; }

Property Value

TimeSpan?

Near

Gets or sets the location near which to search.

public XYPoint Near { get; set; }

Property Value

XYPoint

Methods

SetAdditionalField(string, BsonValue)

Sets the name and value of the additional field.

public GeoHaystackSearchArgs SetAdditionalField(string name, BsonValue value)

Parameters

name string

Name of the additional field.

value BsonValue

The value.

Returns

GeoHaystackSearchArgs

The args so calls can be chained.

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

Sets the name and value of the additional field.

public GeoHaystackSearchArgs SetAdditionalField<TDocument, TMember>(Expression<Func<TDocument, TMember>> memberExpression, TMember value)

Parameters

memberExpression Expression<Func<TDocument, TMember>>

The member expression.

value TMember

The value.

Returns

GeoHaystackSearchArgs

The args so calls can be chained.

Type Parameters

TDocument

The type of the document.

TMember

The type of the member.