Class GeoHaystackSearchOptionsBuilder
A builder for the options of the GeoHaystackSearch command.
[Serializable]
[Obsolete("Use GeoHaystackSearchArgs instead.")]
[BsonSerializer(typeof(GeoHaystackSearchOptionsBuilder.Serializer))]
public class GeoHaystackSearchOptionsBuilder : BuilderBase, IConvertibleToBsonDocument, IMongoGeoHaystackSearchOptions
- Inheritance
-
GeoHaystackSearchOptionsBuilder
- 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 SetLimit(int value)
Parameters
valueintThe maximum number of results to return.
Returns
- GeoHaystackSearchOptionsBuilder
The builder (so method calls can be chained).
SetMaxDistance(double)
Sets the max distance.
public GeoHaystackSearchOptionsBuilder SetMaxDistance(double value)
Parameters
valuedoubleThe max distance.
Returns
- GeoHaystackSearchOptionsBuilder
The builder (so method calls can be chained).
SetQuery(string, BsonValue)
Sets the query on the optional additional field.
public GeoHaystackSearchOptionsBuilder SetQuery(string additionalFieldName, BsonValue value)
Parameters
additionalFieldNamestringThe name of the additional field.
valueBsonValueThe value fo the additional field.
Returns
- GeoHaystackSearchOptionsBuilder
The builder (so method calls can be chained).
ToBsonDocument()
Returns the result of the builder as a BsonDocument.
public override BsonDocument ToBsonDocument()
Returns
- BsonDocument
A BsonDocument.