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.19.1+3a2a09dd959482f665ffbb5df2557ec541597af4
Syntax public SearchDefinition<TDocument> GeoShape<TCoordinates>(
SearchPathDefinition<TDocument> path,
GeoShapeRelation relation,
GeoJsonGeometry<TCoordinates> geometry,
SearchScoreDefinition<TDocument> score = null
)
where TCoordinates : GeoJsonCoordinates
Public Function GeoShape(Of TCoordinates As GeoJsonCoordinates) (
path As SearchPathDefinition(Of TDocument),
relation As GeoShapeRelation,
geometry As GeoJsonGeometry(Of TCoordinates),
Optional score As SearchScoreDefinition(Of TDocument) = Nothing
) As SearchDefinition(Of TDocument)
member GeoShape :
path : SearchPathDefinition<'TDocument> *
relation : GeoShapeRelation *
geometry : GeoJsonGeometry<'TCoordinates> *
?score : SearchScoreDefinition<'TDocument>
(* Defaults:
let _score = defaultArg score null
*)
-> SearchDefinition<'TDocument> when 'TCoordinates : GeoJsonCoordinates
Parameters
- path
- Type: MongoDB.Driver.SearchSearchPathDefinitionTDocument
Indexed geo type field or fields to search. - relation
- Type: MongoDB.Driver.SearchGeoShapeRelation
[Missing <param name="relation"/> documentation for "M:MongoDB.Driver.Search.SearchDefinitionBuilder`1.GeoShape``1(MongoDB.Driver.Search.SearchPathDefinition{`0},MongoDB.Driver.Search.GeoShapeRelation,MongoDB.Driver.GeoJsonObjectModel.GeoJsonGeometry{``0},MongoDB.Driver.Search.SearchScoreDefinition{`0})"]
- geometry
- Type: MongoDB.Driver.GeoJsonObjectModelGeoJsonGeometryTCoordinates
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.SearchSearchScoreDefinitionTDocument
The score modifier.
Type Parameters
- TCoordinates
- The type of the coordinates.
Return Value
Type:
SearchDefinitionTDocumentA geo shape search definition.
See Also