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
pathSearchPathDefinition<TDocument>Indexed geo type field or fields to search.
relationGeoShapeRelationRelation of the query shape geometry to the indexed field geometry.
geometryGeoJsonGeometry<TCoordinates>GeoJSON object specifying the Polygon, MultiPolygon, or LineString shape or point to search.
scoreSearchScoreDefinition<TDocument>The score modifier.
Returns
- SearchDefinition<TDocument>
A geo shape search definition.
Type Parameters
TCoordinatesThe 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
pathExpression<Func<TDocument, TField>>Indexed geo type field or fields to search.
relationGeoShapeRelationRelation of the query shape geometry to the indexed field geometry.
geometryGeoJsonGeometry<TCoordinates>GeoJSON object specifying the Polygon, MultiPolygon, or LineString shape or point to search.
scoreSearchScoreDefinition<TDocument>The score modifier.
Returns
- SearchDefinition<TDocument>
A geo shape search definition.
Type Parameters
TCoordinatesThe type of the coordinates.
TFieldThe type of the field.