Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Corrrectly filter /place queries by layer
`/place` queries have been executing in a way where only the ID, but not the layer, has been considered when returning records from Elasticsearch. It turns out this bug was introduced almost a year and a half ago in #407. A little, relatively unimportant bit of code was looking for a property called `layers`: ``` const cmd = req.clean.ids.map( function(id) { return { _index: apiConfig.indexName, _type: id.layers, _id: id.id }; }); ``` The correct property was `layer`, so no filtering on layer was done in the resulting [mget](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-get.html) query. There was never an acceptance test for these sorts of queries, but there is now one in pelias/acceptance-tests#446 Fixes pelias/pelias#643
- Loading branch information