SearchDefinitionBuilderTDocumentGeoShapeTCoordinates, TField Method (ExpressionFuncTDocument, TField, 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.22.0+75246110ed1247226fcc7f8eb2c54ffab745693e
Syntax public SearchDefinition<TDocument> GeoShape<TCoordinates, TField>(
Expression<Func<TDocument, TField>> path,
GeoShapeRelation relation,
GeoJsonGeometry<TCoordinates> geometry,
SearchScoreDefinition<TDocument> score = null
)
where TCoordinates : GeoJsonCoordinates
Public Function GeoShape(Of TCoordinates As GeoJsonCoordinates, TField) (
path As Expression(Of Func(Of TDocument, TField)),
relation As GeoShapeRelation,
geometry As GeoJsonGeometry(Of TCoordinates),
Optional score As SearchScoreDefinition(Of TDocument) = Nothing
) As SearchDefinition(Of TDocument)
member GeoShape :
path : Expression<Func<'TDocument, 'TField>> *
relation : GeoShapeRelation *
geometry : GeoJsonGeometry<'TCoordinates> *
?score : SearchScoreDefinition<'TDocument>
(* Defaults:
let _score = defaultArg score null
*)
-> SearchDefinition<'TDocument> when 'TCoordinates : GeoJsonCoordinates
Parameters
- path
- Type: System.Linq.ExpressionsExpressionFuncTDocument, TField
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.
- TField
- The type of the field.
Return Value
Type:
SearchDefinitionTDocumentA geo shape search definition.
See Also