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