Click or drag to resize

SearchDefinitionBuilderTDocumentGeoWithinTCoordinates Method (SearchPathDefinitionTDocument, GeoJsonGeometryTCoordinates, SearchScoreDefinitionTDocument)

Creates a search definition that queries for geographic points within a given geometry.

Namespace:  MongoDB.Driver.Search
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.22.0+75246110ed1247226fcc7f8eb2c54ffab745693e
Syntax
public SearchDefinition<TDocument> GeoWithin<TCoordinates>(
	SearchPathDefinition<TDocument> path,
	GeoJsonGeometry<TCoordinates> geometry,
	SearchScoreDefinition<TDocument> score = null
)
where TCoordinates : GeoJsonCoordinates

Parameters

path
Type: MongoDB.Driver.SearchSearchPathDefinitionTDocument
Indexed geo type field or fields to search.
geometry
Type: MongoDB.Driver.GeoJsonObjectModelGeoJsonGeometryTCoordinates
GeoJSON object specifying the MultiPolygon or Polygon to search within.
score (Optional)
Type: MongoDB.Driver.SearchSearchScoreDefinitionTDocument
The score modifier.

Type Parameters

TCoordinates
The type of the coordinates.

Return Value

Type: SearchDefinitionTDocument
A geo within search definition.
See Also