pelias / api

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

address layer performance filter disabled with negative layers #1601

Closed missinglink closed 2 years ago

missinglink commented 2 years ago

we have an address layer filter in place to avoid querying the large address layer when it's not required (input too long, missing the required components, etc).

with the introduction of https://github.com/pelias/api/pull/1525 it seems that this filter is incorrectly circumvented when providing a negative layer configuration in the query params, such as: layers=-empire.

I suspect whats happening here is internally layers=DIFFERENCE(['empire'], auto_discover_layers) and so therefore includes address which in turn disables the filter mechanism.