SearchDefinitionBuilderTDocumentGeoWithinTCoordinates, TField Method (ExpressionFuncTDocument, TField, 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.21.0+5a9c3311e158910b88195f290e6d4b1b2715d2b2
Syntax public SearchDefinition<TDocument> GeoWithin<TCoordinates, TField>(
Expression<Func<TDocument, TField>> path,
GeoJsonGeometry<TCoordinates> geometry,
SearchScoreDefinition<TDocument> score = null
)
where TCoordinates : GeoJsonCoordinates
Public Function GeoWithin(Of TCoordinates As GeoJsonCoordinates, TField) (
path As Expression(Of Func(Of TDocument, TField)),
geometry As GeoJsonGeometry(Of TCoordinates),
Optional score As SearchScoreDefinition(Of TDocument) = Nothing
) As SearchDefinition(Of TDocument)
member GeoWithin :
path : Expression<Func<'TDocument, 'TField>> *
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. - 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.
- TField
- The type of the field.
Return Value
Type:
SearchDefinitionTDocumentA geo within search definition.
See Also