Adds a controller, service (which could probably be made more generic and share with pointinpolygon), and predicates for determining when placeholder should be called.
This also renames `is_pip_service_enabled.js` to `is_service_enabled.js` since it's generic. If placeholder returns a non-empty response then `res.data` is populated, otherwise `res.data` is not populated, allowing fallback to existing production behavior.
- added URI-formatted `api.pipService` config support in schema
- added predicate that determines whether pipService is enabled/disabled
- reworked should-execute conditions for non-coarse reverse
several things are in this commit:
- coarse reverse controller / pip service
- inject "conditional execute" predicate into search service to shortcut execution conditions
- added coarse reverse controller to precede standard reverse controller
- lots of tests!
- created `/component` route
- broke out trimByGranularityComponent but could conceivably be combined with existing
- added `address` support to text_parser
- added `component` sanitizer wrapper
while we're refining our process for integrating libpostal, the ES querying behavior will be:
- call ES with the fallback/geodisambiguation query
- if there are 0 results, call ES with the existing behavior
For when we have multiple active API versions, we have code to redirect
from one running API server to another. Right now, we've disabled the
beta/legacy API server and haven't released a V2 yet, so we currently
have no proxying configured.
Right now the default with no configuration is to simply return an
error. However that means that request to http://search.mapzen.com/
return that unfriendly error. We have a nice friendly /v1 page, so in
the case of no proxy being set up, it makes sense to redirect to that.