Julian Simioni
c6c547f6a2
Log expected and actual zipcode when computing confidence
9 years ago
Julian Simioni
bb3fede3c0
Fix references to address zip
9 years ago
Peter Johnson
4e43310288
german street/number naming convention
9 years ago
Julian Simioni
05a840753d
Add comment for confidence score function
9 years ago
Peter Johnson
c609ae3ccf
http friendly status codes. resolves #321
9 years ago
Peter Johnson
a209024143
remove cache control headers
9 years ago
Diana Shkolnikov
ce32802368
Hotfix for confidence exception
9 years ago
Diana Shkolnikov
553f9780c5
Remove admin matching when address is not parsed
9 years ago
Peter Johnson
82ab899ecc
progress commit
9 years ago
Diana Shkolnikov
537effa8bf
Fix distance calculation to use 'point.lat' instead of 'lat'
9 years ago
Diana Shkolnikov
f63533dd9c
Switch to res.data instead of req.results.data
9 years ago
Stephen Hess
0cc4ac33e3
switched to lodash for is-number validation, removed range operation since ordering of conditionals makes them redundant
9 years ago
Stephen Hess
8be249b701
added helper variables for readability
9 years ago
Stephen Hess
5849477929
adjusted 'exact' confidence to be within 1 meter
9 years ago
Stephen Hess
0b5172a452
initial stab at confidence score calculation based on distance from point.lat and point.lon
9 years ago
Diana Shkolnikov
9433d995b1
Fix attribution link
9 years ago
Diana Shkolnikov
73419342a6
Fix attribution link
9 years ago
Peter Johnson
7c46aed4a7
expose error messages in geojson
9 years ago
Peter Johnson
6ab81ffca5
set response data/meta on instead of
9 years ago
Peter Johnson
3408e2caa5
fix CORS support by enabling OPTIONS endpoint
9 years ago
Diana Shkolnikov
67e034f5f2
Rename `source` to `sources`
...
... with a dash of refactoring thrown in for good measure
9 years ago
Diana Shkolnikov
dd78f324ee
Compute distance for each result of reverse query
9 years ago
Peter Johnson
dfa851ec5c
bugfix
9 years ago
Julian Simioni
ade4ce8b17
Add types middleware
...
This middleware looks at the list of types that will be sent to
Elasticsearch, if it's an empty array, it sends an error response before
Elasticsearch is even quieried, because Elasticsearch interprets an
empty type array as "search anything" rather than the intended "don't
search anything".
9 years ago
Diana Shkolnikov
66710f0c88
Change magic number for deal breakers to 0.5
9 years ago
Diana Shkolnikov
f7044d2435
Add content for `attribution` static endpoint
...
Fixes #212
9 years ago
Julian Simioni
6f0ad678eb
Add types middleware
...
This middleware looks at the list of types that will be sent to
Elasticsearch, if it's an empty array, it sends an error response before
Elasticsearch is even quieried, because Elasticsearch interprets an
empty type array as "search anything" rather than the intended "don't
search anything".
9 years ago
Diana Shkolnikov
d9cb96dad2
Fix relativeScore config value setting
9 years ago
Diana Shkolnikov
562338635c
Confidence score calculation
...
Fixes pelias/pelias#120
9 years ago
Diana Shkolnikov
1d8db6e5d1
Change type back to layer... oooops
9 years ago
Diana Shkolnikov
0f2ff935ec
Add checks for presence of results
9 years ago
Julian Simioni
826ad3b569
Move to simpler routing model
9 years ago
Diana Shkolnikov
1b4b401a66
More property renaming/mapping
...
* Rename `layer` to `type` and `source`
* Rename `address` block and merge properties to main `geocoding` namespace
9 years ago
Diana Shkolnikov
5647d0d19a
Add middleware for renaming placename properties to match WOF
9 years ago
Diana Shkolnikov
db0e063d8c
Refactor controllers to be simple midddleware
...
Refactor search and doc controllers to allow for post-processing middleware
to handle geojson and response sending. Allows for a much more flexible routing scheme.
9 years ago
Julian Simioni
fc6ed1c7f3
Add semver middleware
...
This uses the http-proxy module to send requests to another API instance
based on the version string contained in the request.
9 years ago
Harish Krishna
3ed4842e86
timeout is one word
10 years ago
Harish Krishna
8e17f28170
typeof error should be string
10 years ago
Harish Krishna
b3f85ebc17
err & err.message instead of err.message
10 years ago
Harish Krishna
381cb1917a
big fix - err is of type string if there is an error within express app - its of type object (with .message being string) in case of errors messages from the ES cluster
10 years ago
Harish Krishna
ae4e75784f
big fix - err is of type string if there is an error within express app - its of type object (with .message being string) in case of errors messages from the ES cluster
10 years ago
Harish Krishna
1cfa76880b
check for err message if it contains the words request timeout (because sometimes it comes back as a 500 even though it should be 408)
10 years ago
Harish Krishna
71b0c12f70
check for err message if it contains the words request timeout (because sometimes it comes back as a 500 even though it should be 408)
10 years ago
Harish Krishna
812e56c516
Revert "[debug] if ES cluster in stage/prod ever returns 408"
...
This reverts commit d2cc05b8e8
.
10 years ago
Harish Krishna
d2cc05b8e8
[debug] if ES cluster in stage/prod ever returns 408
10 years ago
Harish Krishna
793182148a
middleware fix
10 years ago
Harish Krishna
b51aed512b
adding 408.js
10 years ago
Harish Krishna
f2197c4dd2
middleware fix
10 years ago
Harish Krishna
78c112d787
adding 408.js
10 years ago
Severyn Kozak
0b8220cbf3
Log only once per error.
...
middleware/500.js
-Make one log call per error rather than two, to reduce
clutter/noise.
10 years ago