Method GeoNear
| MongoDB CSharp Driver API Reference (original) (raw)
Namespace
Assembly
MongoDB.Driver.dll
GeoNear<TInput, TCoordinates, TOutput>(GeoJsonPoint, GeoNearOptions<TInput, TOutput>)
Creates a $geoNear stage.
public static PipelineStageDefinition<TInput, TOutput> GeoNear<TInput, TCoordinates, TOutput>(GeoJsonPoint<TCoordinates> near, GeoNearOptions<TInput, TOutput> options = null) where TCoordinates : GeoJsonCoordinatesParameters
near GeoJsonPoint
The point for which to find the closest documents.
options GeoNearOptions<TInput, TOutput>
The options.
Returns
PipelineStageDefinition<TInput, TOutput>
The stage.
Type Parameters
TInput
The type of the input documents.
TCoordinates
The type of the coordinates for the point.
TOutput
The type of the output documents.
GeoNear<TInput, TOutput>(double[], GeoNearOptions<TInput, TOutput>)
Creates a $geoNear stage.
public static PipelineStageDefinition<TInput, TOutput> GeoNear<TInput, TOutput>(double[] near, GeoNearOptions<TInput, TOutput> options = null)Parameters
near double[]
The point for which to find the closest documents.
options GeoNearOptions<TInput, TOutput>
The options.
Returns
PipelineStageDefinition<TInput, TOutput>
The stage.
Type Parameters
TInput
The type of the input documents.
TOutput
The type of the output documents.