pelias / api

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

Layers and sources ignored results in ignored sources only #1653

Open arnesetzer opened 1 year ago

arnesetzer commented 1 year ago

Describe the bug If you start a request and ignore some sources (eg: sources=-gn) and some layers (eg. layers=-macrocounty%2C-empire%2C-continent%2C-country%2C-region%2C-ocean%2C-venue) the negated layers are ignored every time.

Steps to Reproduce Create a query where some layers and sources are ignored. (eg. https://pelias.github.io/compare/#/v1/search?sources=-gn&layers=-macrocounty%2C-empire%2C-continent%2C-country%2C-region%2C-ocean%2C-venue&text=M%C3%BCnchen+Hbf&debug=1). As you can see in the results that venues are not ignored. If the query just ignores some layers (eg. https://pelias.github.io/compare/#/v1/search?layers=-macrocounty%2C-empire%2C-continent%2C-country%2C-region%2C-ocean%2C-venue&text=M%C3%BCnchen+Hbf&debug=1) everything looks good.

Expected behavior That the two parameters are combinded an return a result which suits the parameters. Or throws an error/warning that this combination isn't allowed.

Environment (please complete the following information):

References

Didn't found any. Sorry, if I created a duplicate 🙈