Method GeoNear
GeoNear<TResult, TCoordinates, TNewResult>(IAggregateFluent<TResult>, GeoJsonPoint<TCoordinates>, GeoNearOptions<TResult, TNewResult>)
Appends a $geoNear stage to the pipeline.
public static IAggregateFluent<TNewResult> GeoNear<TResult, TCoordinates, TNewResult>(this IAggregateFluent<TResult> aggregate, GeoJsonPoint<TCoordinates> near, GeoNearOptions<TResult, TNewResult> options = null) where TCoordinates : GeoJsonCoordinates
Parameters
aggregate
IAggregateFluent<TResult>The aggregate.
near
GeoJsonPoint<TCoordinates>The point for which to find the closest documents.
options
GeoNearOptions<TResult, TNewResult>The options.
Returns
- IAggregateFluent<TNewResult>
The fluent aggregate interface.
Type Parameters
TResult
The type of the result.
TCoordinates
The type of the coordinates for the point.
TNewResult
The type of the new result.
GeoNear<TResult, TNewResult>(IAggregateFluent<TResult>, double[], GeoNearOptions<TResult, TNewResult>)
Appends a $geoNear stage to the pipeline.
public static IAggregateFluent<TNewResult> GeoNear<TResult, TNewResult>(this IAggregateFluent<TResult> aggregate, double[] near, GeoNearOptions<TResult, TNewResult> options = null)
Parameters
aggregate
IAggregateFluent<TResult>The aggregate.
near
double[]The point for which to find the closest documents.
options
GeoNearOptions<TResult, TNewResult>The options.
Returns
- IAggregateFluent<TNewResult>
The fluent aggregate interface.
Type Parameters
TResult
The type of the result.
TNewResult
The type of the new result.