SearchDefinitionBuilderTDocumentGeoWithinTCoordinates Method (SearchPathDefinitionTDocument, GeoWithinAreaTCoordinates, SearchScoreDefinitionTDocument) |
Creates a search definition that queries for geographic points within a given geo object.
Namespace:
MongoDB.Driver.Search
Assembly:
MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.21.0+5a9c3311e158910b88195f290e6d4b1b2715d2b2
Syntax public SearchDefinition<TDocument> GeoWithin<TCoordinates>(
SearchPathDefinition<TDocument> path,
GeoWithinArea<TCoordinates> area,
SearchScoreDefinition<TDocument> score = null
)
where TCoordinates : GeoJsonCoordinates
Public Function GeoWithin(Of TCoordinates As GeoJsonCoordinates) (
path As SearchPathDefinition(Of TDocument),
area As GeoWithinArea(Of TCoordinates),
Optional score As SearchScoreDefinition(Of TDocument) = Nothing
) As SearchDefinition(Of TDocument)
member GeoWithin :
path : SearchPathDefinition<'TDocument> *
area : GeoWithinArea<'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. - area
- Type: MongoDB.Driver.SearchGeoWithinAreaTCoordinates
Object that specifies the area to search within. - score (Optional)
- Type: MongoDB.Driver.SearchSearchScoreDefinitionTDocument
The score modifier.
Type Parameters
- TCoordinates
- The type of the coordinates.
Return Value
Type:
SearchDefinitionTDocumentA geo within search definition.
See Also