Horace Williams
ed0a96cff2
Migrate to internal iso3166 defnitions
...
This is a somewhat roundabout fix to #1179 ,
as a way to deal with the persistent npm ls
and commit hook troubles we were dealing with
due to dependencies of the iso3166 package.
Additionally it should give us a faster
definition of these ISO lookups, since the
existing approaches were implemented using
linear scans through an array rather than
map-based lookups.
6 years ago
Peter Johnson
e15aa52f63
feat(type_mapping): rename function to avoid confusion with elasticsearch API
7 years ago
missinglink
b1cfd091ed
type_mapping: add unit tests
7 years ago
missinglink
63c962503c
test: improved type_mapping tests
7 years ago
missinglink
59f0f4d70e
add line comment, fix line comment
7 years ago
missinglink
7a01e794cf
support aliases for name fields
7 years ago
Julian Simioni
dccad99d78
Move sizeCalculator middleware tests to the correct place
7 years ago
Julian Simioni
f887d7a249
Rename test setup function
...
It now can be confused for the middleware setup function
7 years ago
Julian Simioni
94946989bb
Test cases with a lower min query size
7 years ago
Julian Simioni
825b506a75
Revise tests to account for sizeCalculator setup params
7 years ago
Stephen Hess
3a862c17ec
move empire include/exclude logic to eojsonify_place_details
7 years ago
Stephen Hess
e4e8d9b0bf
if country_gid exists, remove empire fields
7 years ago
Stephen Hess
18e7673dc1
added empire to coarse translation
7 years ago
Stephen Hess
214c3807eb
added continent, ocean, and marinearea to geojsonify
7 years ago
Stephen Hess
9d54735e41
converted geojsonify_place_details to return instead of modify
7 years ago
Stephen Hess
cd99f87c04
inlined and condensed doc setup
7 years ago
Stephen Hess
5e1360f022
refactored geojsonify, improved test coverage
7 years ago
Stephen Hess
27194a620e
added tests for geocode_place_details
7 years ago
Stephen Hess
e70a668056
added support for continent, ocean, and marinearea placetypes
...
`coarse` now maps to these as well
7 years ago
Lily He
7ecf770d79
create stackTraceLine helper to debug predicates
7 years ago
Lily He
af03e706b2
debug push takes function & beginTimer returns Date
7 years ago
Lily He
cafb7d9277
created new debug helper class and debug sanitizer
7 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
Diana Shkolnikov
a52691c61e
feat: search by postalcode
8 years ago
Stephen Hess
34d9893018
removed unused parameter
8 years ago
Stephen Hess
beb309ca07
moved assignLabels to fire before geojsonify
8 years ago
Stephen Hess
248b1299c8
added post-processing step to generate labels
...
injects label generation function for easier unit testing
moved label generation code to separate package
8 years ago
Stephen Hess
c14a1311f7
extracted labelGenerator to be injectable
8 years ago
Diana Shkolnikov
a8e82b018d
Refactor deduper and write additional tests
8 years ago
Stephen Hess
29c1255694
added `dependency` fields to output
8 years ago
Alec Vulfson
a6ccbf17ce
Add provinces to Australian labels
8 years ago
Stephen Hess
1b83247964
exclude `name` for `country` result labels
8 years ago
Diana Shkolnikov
cc9c4148bb
Refactor geojsonify code and add ability to pass in clean query params
8 years ago
Diana Shkolnikov
269733b70c
Add type property to allow proper handling of arrays
8 years ago
Alec Vulfson
2092cf2e15
Shows county in label if there isnt a locality or local admin
8 years ago
Diana Shkolnikov
1435de906d
Add source_id property
9 years ago
Julian Simioni
9e12c650d0
Add logging helper module
...
This module has helper methods for logging. Currently it has methods to:
* detect if DNT is enabled
* remove sensitive information from input fields for logging
9 years ago
Stephen Hess
bd3b8e7bbe
switched to pelias-text-analyzer package since that responsibility has been moved to there
9 years ago
Stephen Hess
9cdfce13c1
fixed extraneous comma labels for results with only a `name`
9 years ago
Stephen Hess
2c40827701
added `layer=borough` support for *all 5 boroughs* in data
9 years ago
Stephen Hess
0076200728
added special case for USA in labels
...
if record is for literal United States, use the full name, otherwise use USA
9 years ago
Stephen Hess
c99fa9f0ef
added support for `macroregion`
9 years ago
Stephen Hess
8a54dbeef0
switched from `macrocountry` to `macrocounty`
9 years ago
Diana Shkolnikov
05f4374b0a
Add more tests without spaces
9 years ago
Diana Shkolnikov
c415b96ead
Named admin_parts adminParts which caused problems
9 years ago
Stephen Hess
caa9745aaa
standardized on naming conventions
9 years ago
Stephen Hess
f783560224
split tests into logical units
9 years ago
Stephen Hess
c5626d6c5e
added `localadmin` for USA/GBR/default when `locality` isn't available
9 years ago
Stephen Hess
0870e30366
Refactored the label generation code to be simpler
...
Labels are now, outside US/CA/UK, just name+city+country.
Deduping now only occurs on the first 2 parts of the labels which fixes the "Luxembourg, Luxembourg" issue.
9 years ago
Julian Simioni
39502df284
Add borough to geojson output and USA.local labels
9 years ago