Click or drag to resize

SearchDefinitionBuilder<TDocument>.GeoShape<TCoordinates, TField> Method (Expression<Func<TDocument, TField>>, GeoShapeRelation, GeoJsonGeometry<TCoordinates>, SearchScoreDefinition<TDocument>)

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.19.1+3a2a09dd959482f665ffbb5df2557ec541597af4
Syntax
public SearchDefinition<TDocument> GeoShape<TCoordinates, TField>(
	Expression<Func<TDocument, TField>> path,
	GeoShapeRelation relation,
	GeoJsonGeometry<TCoordinates> geometry,
	SearchScoreDefinition<TDocument> score = null
)
where TCoordinates : GeoJsonCoordinates

Parameters

path
Type: System.Linq.Expressions.Expression<Func<TDocument, TField>>
Indexed geo type field or fields to search.
relation
Type: MongoDB.Driver.Search.GeoShapeRelation

[Missing <param name="relation"/> documentation for "M:MongoDB.Driver.Search.SearchDefinitionBuilder`1.GeoShape``2(System.Linq.Expressions.Expression{System.Func{`0,``1}},MongoDB.Driver.Search.GeoShapeRelation,MongoDB.Driver.GeoJsonObjectModel.GeoJsonGeometry{``0},MongoDB.Driver.Search.SearchScoreDefinition{`0})"]

geometry
Type: MongoDB.Driver.GeoJsonObjectModel.GeoJsonGeometry<TCoordinates>
GeoJSON object specifying the Polygon, MultiPolygon, or LineString shape or point to search. Relation of the query shape geometry to the indexed field geometry.
score (Optional)
Type: MongoDB.Driver.Search.SearchScoreDefinition<TDocument>
The score modifier.

Type Parameters

TCoordinates
The type of the coordinates.
TField
The type of the field.

Return Value

Type: SearchDefinition<TDocument>
A geo shape search definition.
See Also