Click or drag to resize

SearchDefinitionBuilderTDocumentGeoShapeTCoordinates Method (SearchPathDefinitionTDocument, GeoShapeRelation, GeoJsonGeometryTCoordinates, SearchScoreDefinitionTDocument)

Creates a search definition that queries for shapes with a given geometry.

Namespace:  MongoDB.Driver.Search
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.21.0+5a9c3311e158910b88195f290e6d4b1b2715d2b2
Syntax
public SearchDefinition<TDocument> GeoShape<TCoordinates>(
	SearchPathDefinition<TDocument> path,
	GeoShapeRelation relation,
	GeoJsonGeometry<TCoordinates> geometry,
	SearchScoreDefinition<TDocument> score = null
)
where TCoordinates : GeoJsonCoordinates

Parameters

path
Type: MongoDB.Driver.SearchSearchPathDefinitionTDocument
Indexed geo type field or fields to search.
relation
Type: MongoDB.Driver.SearchGeoShapeRelation
Relation of the query shape geometry to the indexed field geometry.
geometry
Type: MongoDB.Driver.GeoJsonObjectModelGeoJsonGeometryTCoordinates
GeoJSON object specifying the Polygon, MultiPolygon, or LineString shape or point to search.
score (Optional)
Type: MongoDB.Driver.SearchSearchScoreDefinitionTDocument
The score modifier.

Type Parameters

TCoordinates
The type of the coordinates.

Return Value

Type: SearchDefinitionTDocument
A geo shape search definition.
See Also