Method GeoNear
GeoNear<TInput, TCoordinates, TOutput>(GeoJsonPoint<TCoordinates>, 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 : GeoJsonCoordinates
Parameters
nearGeoJsonPoint<TCoordinates>The point for which to find the closest documents.
optionsGeoNearOptions<TInput, TOutput>The options.
Returns
- PipelineStageDefinition<TInput, TOutput>
The stage.
Type Parameters
TInputThe type of the input documents.
TCoordinatesThe type of the coordinates for the point.
TOutputThe 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
neardouble[]The point for which to find the closest documents.
optionsGeoNearOptions<TInput, TOutput>The options.
Returns
- PipelineStageDefinition<TInput, TOutput>
The stage.
Type Parameters
TInputThe type of the input documents.
TOutputThe type of the output documents.