Method GeoShape
GeoShape<TCoordinates>(SearchPathDefinition<TDocument>, GeoShapeRelation, GeoJsonGeometry<TCoordinates>, SearchScoreDefinition<TDocument>)
Creates a search definition that queries for shapes with a given geometry.
public SearchDefinition<TDocument> GeoShape<TCoordinates>(SearchPathDefinition<TDocument> path, GeoShapeRelation relation, GeoJsonGeometry<TCoordinates> geometry, SearchScoreDefinition<TDocument> score = null) where TCoordinates : GeoJsonCoordinates
Parameters
path
SearchPathDefinition<TDocument>Indexed geo type field or fields to search.
relation
GeoShapeRelationRelation of the query shape geometry to the indexed field geometry.
geometry
GeoJsonGeometry<TCoordinates>GeoJSON object specifying the Polygon, MultiPolygon, or LineString shape or point to search.
score
SearchScoreDefinition<TDocument>The score modifier.
Returns
- SearchDefinition<TDocument>
A geo shape search definition.
Type Parameters
TCoordinates
The type of the coordinates.
GeoShape<TCoordinates, TField>(Expression<Func<TDocument, TField>>, GeoShapeRelation, GeoJsonGeometry<TCoordinates>, SearchScoreDefinition<TDocument>)
Creates a search definition that queries for shapes with a given geometry.
public SearchDefinition<TDocument> GeoShape<TCoordinates, TField>(Expression<Func<TDocument, TField>> path, GeoShapeRelation relation, GeoJsonGeometry<TCoordinates> geometry, SearchScoreDefinition<TDocument> score = null) where TCoordinates : GeoJsonCoordinates
Parameters
path
Expression<Func<TDocument, TField>>Indexed geo type field or fields to search.
relation
GeoShapeRelationRelation of the query shape geometry to the indexed field geometry.
geometry
GeoJsonGeometry<TCoordinates>GeoJSON object specifying the Polygon, MultiPolygon, or LineString shape or point to search.
score
SearchScoreDefinition<TDocument>The score modifier.
Returns
- SearchDefinition<TDocument>
A geo shape search definition.
Type Parameters
TCoordinates
The type of the coordinates.
TField
The type of the field.