FilterDefinitionBuilderTDocumentNearTCoordinates Method (ExpressionFuncTDocument, Object, GeoJsonPointTCoordinates, NullableDouble, NullableDouble) |
Creates a near filter.
Namespace:
MongoDB.Driver
Assembly:
MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.13.1-v2-13-x1+a7f8afe27855f38f4f72157d11ba2ae73895502e
Syntax public FilterDefinition<TDocument> Near<TCoordinates>(
Expression<Func<TDocument, Object>> field,
GeoJsonPoint<TCoordinates> point,
Nullable<double> maxDistance = null,
Nullable<double> minDistance = null
)
where TCoordinates : GeoJsonCoordinates
Public Function Near(Of TCoordinates As GeoJsonCoordinates) (
field As Expression(Of Func(Of TDocument, Object)),
point As GeoJsonPoint(Of TCoordinates),
Optional maxDistance As Nullable(Of Double) = Nothing,
Optional minDistance As Nullable(Of Double) = Nothing
) As FilterDefinition(Of TDocument)
member Near :
field : Expression<Func<'TDocument, Object>> *
point : GeoJsonPoint<'TCoordinates> *
?maxDistance : Nullable<float> *
?minDistance : Nullable<float>
(* Defaults:
let _maxDistance = defaultArg maxDistance null
let _minDistance = defaultArg minDistance null
*)
-> FilterDefinition<'TDocument> when 'TCoordinates : GeoJsonCoordinates
Parameters
- field
- Type: System.Linq.ExpressionsExpressionFuncTDocument, Object
The field. - point
- Type: MongoDB.Driver.GeoJsonObjectModelGeoJsonPointTCoordinates
The geometry. - maxDistance (Optional)
- Type: SystemNullableDouble
The maximum distance. - minDistance (Optional)
- Type: SystemNullableDouble
The minimum distance.
Type Parameters
- TCoordinates
- The type of the coordinates.
Return Value
Type:
FilterDefinitionTDocumentA near filter.
See Also