FilterDefinitionBuilderTDocumentNearTCoordinates Method (FieldDefinitionTDocument, GeoJsonPointTCoordinates, NullableDouble, NullableDouble) |
Creates a near filter.
Namespace:
MongoDB.Driver
Assembly:
MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.8.0+cc573f3e1f48f39162b4b680e921a623e127e8fa
Syntax public FilterDefinition<TDocument> Near<TCoordinates>(
FieldDefinition<TDocument> field,
GeoJsonPoint<TCoordinates> point,
Nullable<double> maxDistance = null,
Nullable<double> minDistance = null
)
where TCoordinates : GeoJsonCoordinates
Public Function Near(Of TCoordinates As GeoJsonCoordinates) (
field As FieldDefinition(Of TDocument),
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 : FieldDefinition<'TDocument> *
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: MongoDB.DriverFieldDefinitionTDocument
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