Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions packages/mongodb-constants/src/stage-operators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,23 +385,27 @@ const STAGE_OPERATORS = [
namespaces: [...ANY_NAMESPACE],
description: 'Returns documents based on proximity to a geospatial point.',
comment: `/**
* near: The point to search near.
* near: The point to search near, supports the let option and bound let option.
* distanceField: The calculated distance.
* maxDistance: The maximum distance, in meters, documents can be before being excluded from results.
* query: Limits results that match the query
* maxDistance: Optional maximum distance, in meters, documents can be before being excluded from results.
* minDistance: Optional minimum distance from the center point.
* query: Limits results that match the query.
* includeLocs: Optional. Labels and includes the point used to match the document.
* num: Optional. The maximum number of documents to return.
* distanceMultiplier: Optional factor to multiply returned distances by.
* key: Optional geospatial indexed field to use.
* spherical: Defaults to false. Specifies whether to use spherical geometry.
*/
`,
snippet: `{
near: { type: 'Point', coordinates: [ \${1:number}, \${2:number} ] },
distanceField: '\${3:string}',
maxDistance: \${4:number},
query: {\${5}},
includeLocs: '\${6}',
num: \${7:number},
spherical: \${8:boolean}
minDistance: \${5:number},
query: {\${6}},
includeLocs: '\${7:string}',
distanceMultiplier: \${8:number},
key: '\${9:string}',
spherical: \${10:boolean}
}`,
},
{
Expand Down