Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Table of Contents

Method GeoNear

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

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

pipeline PipelineDefinition<TInput, TIntermediate>

The pipeline.

near GeoJsonPoint<TCoordinates>

The point for which to find the closest documents.

options GeoNearOptions<TIntermediate, TOutput>

The options.

Returns

PipelineDefinition<TInput, TOutput>

A new pipeline with an additional stage.

Type Parameters

TInput

The type of the input documents.

TIntermediate

The type of the intermediate documents.

TCoordinates

The type of the coordinates for the point.

TOutput

The 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

pipeline PipelineDefinition<TInput, TIntermediate>

The pipeline.

near double[]

The point for which to find the closest documents.

options GeoNearOptions<TIntermediate, TOutput>

The options.

Returns

PipelineDefinition<TInput, TOutput>

A new pipeline with an additional stage.

Type Parameters

TInput

The type of the input documents.

TIntermediate

The type of the intermediate documents.

TOutput

The type of the output documents.