Class GeoHaystackSearchOptionsBuilder<TDocument>
A builder for the options of the GeoHaystackSearch command.
[Serializable]
[Obsolete("Use GeoHaystackSearchArgs instead.")]
[BsonSerializer(typeof(GeoHaystackSearchOptionsBuilder<>.Serializer))]
public class GeoHaystackSearchOptionsBuilder<TDocument> : BuilderBase, IConvertibleToBsonDocument, IMongoGeoHaystackSearchOptionsType Parameters
- TDocument
- The type of the document. 
- Inheritance
- 
      
      
      GeoHaystackSearchOptionsBuilder<TDocument>
- 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<TDocument> SetLimit(int value)Parameters
- valueint
- 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 GeoHaystackSearchOptionsBuilder<TDocument> SetMaxDistance(double value)Parameters
- valuedouble
- 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 GeoHaystackSearchOptionsBuilder<TDocument> SetQuery<TMember>(Expression<Func<TDocument, TMember>> memberExpression, TMember value)Parameters
- memberExpressionExpression<Func<TDocument, TMember>>
- The member expression. 
- valueTMember
- The value fo the additional field. 
Returns
- GeoHaystackSearchOptionsBuilder<TDocument>
- The builder (so method calls can be chained). 
Type Parameters
- TMember
- The type of the member. 
ToBsonDocument()
Converts this object to a BsonDocument.
public override BsonDocument ToBsonDocument()Returns
- BsonDocument
- A BsonDocument.