Method GeoNear
GeoNear<TInput, TIntermediate, TCoordinates, TOutput>(PipelineDefinition<TInput, TIntermediate>, GeoJsonPoint<TCoordinates>, GeoNearOptions<TIntermediate, TOutput>)
Appends a $geoNear stage to the pipeline.
public static PipelineDefinition<TInput, TOutput> GeoNear<TInput, TIntermediate, TCoordinates, TOutput>(this PipelineDefinition<TInput, TIntermediate> pipeline, GeoJsonPoint<TCoordinates> near, GeoNearOptions<TIntermediate, TOutput> options = null) where TCoordinates : GeoJsonCoordinates
Parameters
pipelinePipelineDefinition<TInput, TIntermediate>The pipeline.
nearGeoJsonPoint<TCoordinates>The point for which to find the closest documents.
optionsGeoNearOptions<TIntermediate, TOutput>The options.
Returns
- PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInputThe type of the input documents.
TIntermediateThe type of the intermediate documents.
TCoordinatesThe type of the coordinates for the point.
TOutputThe type of the output documents.
GeoNear<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, double[], GeoNearOptions<TIntermediate, TOutput>)
Appends a $geoNear stage to the pipeline.
public static PipelineDefinition<TInput, TOutput> GeoNear<TInput, TIntermediate, TOutput>(this PipelineDefinition<TInput, TIntermediate> pipeline, double[] near, GeoNearOptions<TIntermediate, TOutput> options = null)
Parameters
pipelinePipelineDefinition<TInput, TIntermediate>The pipeline.
neardouble[]The point for which to find the closest documents.
optionsGeoNearOptions<TIntermediate, TOutput>The options.
Returns
- PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInputThe type of the input documents.
TIntermediateThe type of the intermediate documents.
TOutputThe type of the output documents.