pelias / api

HTTP API for Pelias Geocoder
http://pelias.io
MIT License
220 stars 163 forks source link

boundary.country doesn't include dependencies #1517

Open missinglink opened 3 years ago

missinglink commented 3 years ago

Using the 'boundary.country' filter on dependencies, such as boundary.country=PRI currently returns no results.

eg. the record for San Juan, Puerto Rico has a dependency property but no country property, so it's always excluded when using boundary.country filtering.

image https://pelias.github.io/compare/#/v1/place?ids=whosonfirst%3Alocality%3A1126038493

missinglink commented 3 years ago

I think we should treat "boundary.country" as if it were "boundary.ISO" (ie. include both countries and dependencies despite the name saying it's only countries).

Introducing a new filter called boundary.dependency and expecting users to know which one to use in which case sounds messy.

Thoughts?