Stephen Hess
f14400ebce
added placeholder service support to API for admin-only queries
...
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.
8 years ago
Kevin Ennis
512cec9945
Prefer openaddresses results with zip code
8 years ago
Julian Simioni
6b0b124d8f
Always query for a minimum of 20 results from Elasticsearch
...
Fallback and interpolation queries rely on several results coming back
from Elasticsearch to ensure the best result is returned. It was
possible that queries with `size=1` would not return enough results from
Elasticsearch. This change ensures even with `size=1` a sufficient
number of results are returned.
Fixes https://github.com/pelias/pelias/issues/562
8 years ago
Julian Simioni
6014786162
Revert "Update pelias-query to the latest version 🚀 "
8 years ago
Stephen Hess
d80d34cfd9
actually pass do-not-track to service
8 years ago
Stephen Hess
a7867579de
pass dnt to pip service and sanitize error messages
8 years ago
Julian Simioni
c585b00a9b
Remove unused reverse fixture
...
This must have been missed when we removed boundary.circle a long time
ago.
8 years ago
Julian Simioni
81b52fafaf
Use bool instead of filtered queries in fixtures
...
This is needed for Elasticsearch 5 support as part of https://github.com/pelias/pelias/issues/461
8 years ago
Diana Shkolnikov
e1eeb25776
fix: geonames ids should not be misrepresented in hiearchy
8 years ago
Diana Shkolnikov
d6d328fdf6
fix: 500 errors returned when no language service is found
8 years ago
Diana Shkolnikov
e46c17a84a
Sort interpolated results to show address first
8 years ago
missinglink
8d774ab6d3
language service
8 years ago
Peter Johnson
af4b107612
language: update ciao tests to assert warnings produced for invalid inputs
8 years ago
Peter Johnson
43131248b7
language: fallback scenario from invalid querystring to valid header
8 years ago
Peter Johnson
39b1367778
language: accept param as well as request headers
8 years ago
Peter Johnson
e761f99422
add unit tests for language
8 years ago
Peter Johnson
1847fb3692
add unit tests for language
8 years ago
Peter Johnson
7749be549e
add ciao tests for language
8 years ago
Peter Johnson
3a7e8c5229
fix ciao tests for postalcode layer added
8 years ago
Diana Shkolnikov
fe38d2336d
feat: allow postalcode-only structured queries
8 years ago
Stephen Hess
f06704985e
renamed predicates to be more accurate
8 years ago
Stephen Hess
0d1d67d6a2
added street layer
8 years ago
Stephen Hess
58701f0169
return do-nothing PiP lookup function if config lacks `pipService`
...
- 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
8 years ago
Stephen Hess
52a6ec68ff
added support for coarse reverse geocoding
...
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!
8 years ago
Diana Shkolnikov
587c1ede6c
remove empty file that snuck in
8 years ago
Diana Shkolnikov
6dd4cc9bd8
fix postalcodes not showing up in results
8 years ago
Diana Shkolnikov
a52691c61e
feat: search by postalcode
8 years ago
Stephen Hess
bb9d6e0fc9
inject schema to config.generate
8 years ago
Stephen Hess
2288e227a3
converted configValidation to basic schema object
...
to inject into `config.generate`
fixed tests
8 years ago
Stephen Hess
5d28044f4f
removed unused file
8 years ago
Stephen Hess
bfecda2c07
refactored search service tests to inline mock callbacks
8 years ago
Stephen Hess
62a2aa827f
added api.requestRetries to schema and tests
8 years ago
Stephen Hess
901b6826ca
updated wording of test names and comments
8 years ago
Stephen Hess
11b39b3f54
removed unused mock backend response
8 years ago
Stephen Hess
3c9d39d1df
removed unused file
8 years ago
Stephen Hess
ac0776e2be
match error handling to controller/search
8 years ago
Stephen Hess
6425cc6444
added request retries for ES request timeouts
8 years ago
Stephen Hess
89d9943f26
removed unused mock object
8 years ago
Stephen Hess
d5ff417bf5
removed require's for mock backend/query
8 years ago
Stephen Hess
96f9d12ff5
rewrote tests to proxyquire service/search to reduce complexity
...
added a few more tests for coverage, removed unused things from unit/mock/backend
8 years ago
Stephen Hess
c7b83e96d5
added tests for case where error is a string, not an object
8 years ago
Stephen Hess
bf62a1844b
added tests for verifying request retry behavior
...
limited retry behavior to errors with status 408 (request timeout). this also reduces reliance on unit/mock/backend and unit/mock/query.
8 years ago
Stephen Hess
e83c12cd0e
added test for early bail when errors are present
...
simplified conditionals using lodash `.get`
8 years ago
Stephen Hess
f1e5edb4cf
added back logging statement for fallback queries
...
added unit tests to cover conditionals, simplified conditional
8 years ago
missinglink
3a4d26077a
interpolation: fix: source_id mapping
8 years ago
Peter Johnson
d135596c80
service: interpolation: typo
8 years ago
Peter Johnson
69be6e062a
service: interpolation: tests
8 years ago
Peter Johnson
33341b7c99
service: interpolation: tests
8 years ago
Diana Shkolnikov
30590a41d3
fix: match_type and confidence score were not correct for certain queries
8 years ago
Stephen Hess
8c249c26f4
initialize esclient in routes/v1, eliminating need for src/backend
8 years ago