Add _geo to your documents
Documents must contain a _geo field with lat and lng values:
Meilisearch also supports GeoJSON for complex geometries like polygons and multi-polygons.
Configure filterable and sortable attributes
To filter results by location, add_geo to filterableAttributes:
_geo to sortableAttributes:
Filter results by location
Use thefilter search parameter with _geoRadius to find results within a given distance from a point. The following example searches for restaurants within 2km of central Milan:
Sort results by distance
Use_geoPoint in the sort search parameter to order results by proximity. The following example sorts restaurants by distance from the Eiffel Tower:
Next steps
Filter by radius
Find results within a circular area around a point
Filter by bounding box
Find results within a rectangular area
Filter by polygon
Find results within a custom polygon shape
Sort by distance
Rank results by proximity to a location
Use GeoJSON format
Index complex geometries with the GeoJSON standard