Dataset
The guide uses a dataset of the 3,000+ biggest airports in the world.JSON
_geoloc attribute.
Initialize the client
Configure index settings
Even if you just want to sort by distance to a location, your textual relevance should also be good so that users can refine the search with a query. To do that, you must configure the . The searchable attributes are:name, city, country, and iata_code.
Filtering inside a rectangle area
The USA can be considered as a polygon:
insideBoundingBox parameter:
- 49.067996905313834, 65.73828125
- 25.905859247243498, 128.8046875
'') returns all matching airports.