Peter Johnson
0caca08787
improve error matching by using string prefix matching on known elasticsearch exception names
9 years ago
Peter Johnson
b15cfb3795
refactor elasticsearch error detection, improve test coverage
9 years ago
missinglink
1c9af40f3c
remove query.tokens_complete and query.tokens_incomplete from geoJSON
9 years ago
Julian Simioni
fd529ccee9
Use new express sendStatus method
...
According to a message on the console:
```
express deprecated res.send(status): Use res.sendStatus(status) instead
middleware/options.js:12:9
```
9 years ago
Julian Simioni
e6e9c1c574
Do not apply local naming conventions to records with no admin info
...
There's no way to decide what to do, and without handling this case the
API will return an error.
9 years ago
Diana Shkolnikov
147c849b58
change admin property names to <place_type>_gid from <place_type>_id
9 years ago
Diana Shkolnikov
82e39fd81f
parent block properties should not be changed, only top level ones
9 years ago
Diana Shkolnikov
201f4d4fb3
Convert parent WOF ids to valid Pelias ids to be used by /place
9 years ago
Diana Shkolnikov
3862dd233e
change admin property names to <place_type>_gid from <place_type>_id
9 years ago
Diana Shkolnikov
10cd693e02
parent block properties should not be changed, only top level ones
9 years ago
Diana Shkolnikov
7231e229d4
Convert parent WOF ids to valid Pelias ids to be used by /place
9 years ago
Stephen Hess
1204727f74
added `macrocounty` and `macroregion` to properties to pull from parent
9 years ago
Vesa Meskanen
0d0651f8ac
Get rid of ugly for-loops using lodash
9 years ago
Vesa Meskanen
00a4bd52a3
Bugfix: deduping caused an error if an array property was missing
...
Conversion from array to string should happen independently for
the compared properties, not only when both are arrays.
9 years ago
Vesa Meskanen
6ab44e0aa2
neighborhood -> neighbourhood
9 years ago
Diana Shkolnikov
4ed5296d79
Update middleware with new prop name
9 years ago
Vesa Meskanen
766b68ef7c
Make street/number flipping configurable
...
pelias_config.api.localization.flipNumberAndStreetCountries can
define an array of ISO 3166-1 alpha-3 country codes, for which
the street number should come after street name.
9 years ago
Diana Shkolnikov
aff146aec3
Fix local naming convention and confidence score middlewares
9 years ago
Vesa Meskanen
caaee361b2
Take absence of information as a difference, after all
...
Is '5 main street' same as 'main street'? Probably not. It may be that
less detailed data is different data, not just bad data. maybe this can
be changed if coordinates are considered, too.
9 years ago
Vesa Meskanen
0e6bf8ed00
Improve response deduping
...
Consider locality and neighborhood, too. Do not take absence of
an attribute as a difference.
9 years ago
Diana Shkolnikov
36b6adddfd
Add bounding_box parsing step
9 years ago
Julian Simioni
a2950eebc4
Cleanup renamePlacenames
9 years ago
Diana Shkolnikov
b7bc3593c2
Lint cleanup
9 years ago
Diana Shkolnikov
e9ceb25ca0
Fix crash when dedupe was comparing arrays as stings for parent properties
9 years ago
Diana Shkolnikov
83de24d3c4
Middleware: remove all use of alpha3/admin0/admin1
9 years ago
Julian Simioni
79883594b8
Use clean.layers to determine types
...
This allows removing the types middleware and simplifies some code.
9 years ago
Julian Simioni
ef78b2e0fd
Filter source and layer by new fields
...
This is functionally the same code as before, except that it uses the
new source and layer mapping.
9 years ago
Diana Shkolnikov
df93be7543
Fix deduping for non-ascii strings
9 years ago
Julian Simioni
d0e2c14738
Check that hit.address exists
...
Fixes #379
9 years ago
Julian Simioni
033345dbb3
Check that hit.address exists
...
Fixes #379
9 years ago
Diana Shkolnikov
9fa5fc5a77
calcSize became middleware (exposed and fixed bug in query defaults)
9 years ago
Diana Shkolnikov
42d940f8c8
Add simple normalizer (lowercase + remove punctuation)
9 years ago
Diana Shkolnikov
54187dde67
Add dedupe middleware
...
Dedupe middleware removes __exact__ dupes and truncates the results
to the specified size.
9 years ago
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