Closed YanDjin closed 2 years ago
Hi @YanDjin, this behavior is intentional. It's fairly common around the world (ie. NY county, city, state), Luxemburg, Singapore etc.
We've had numerous issued filed over the years about insufficient deduplication in these cases, most end users expect a similar experience as the fortune 100 mapping providers, which also 'squash' similarly named entries like we do.
There is a ruleset in the code which defines which layer gets priority, it's usually the locality, as that's usually what the user is searching for.
Hi @missinglink, thanks for the reply, and sorry for the late reply, Thank you for your insight, I modified the ruleset for my use case. I will close this PR.
I am doing a Pelias build for Algeria, in Algeria, the same name is used for the region and the main city in the region. For example, the region Jijel has a city also named Jijel (the biggest city in the region). When using the pelias build, if I search for a region, only the city (locality) named the same will appear in the result and the region will be absent, but if I specify to use only the region layer, then the result will be correct, and I will have the region. Specifying other layers will remove the region from the results. I also reproduced the same behavior in the mapzen online demo, so I don't think it has to do with my installation.
Steps to Reproduce
Expected behavior
Environment (please complete the following information):
Pastebin/Screenshots
using all layers with the url:
http://localhost:4000/v1/autocomplete?text=Jijel&size=20
if we specify the layer region with the url:
http://localhost:4000/v1/autocomplete?text=Jijel&layers=region&size=20
I also tried to use only wof in the sources query param, and still the same results