Stephen Hess
3b981d97ba
copied in tests from master for `search_original`
...
commented out the tests that break because i don't know how to fix them which will probably require help from @missinglink .
8 years ago
Stephen Hess
b1cf06720b
included generatePermutations in list of tests
8 years ago
Alec Vulfson
a6ccbf17ce
Add provinces to Australian labels
8 years ago
Diana Shkolnikov
c38b67aeb4
Add nearby sanitizer and revert reverse to not have categories
9 years ago
Diana Shkolnikov
1c6436d123
Update categories sanitizer and implement unit tests for it
9 years ago
Peter Johnson
5b8a9a31d2
wrap coordinates at poles
9 years ago
Julian Simioni
23ff51fd57
Add custom access_log handlers that remove user info
...
These handlers will remove sensitive query info from the logs when DNT
is enabled
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
Peter Johnson
b15cfb3795
refactor elasticsearch error detection, improve test coverage
9 years ago
missinglink
ee73774c89
add tokenizer, refactor how we determine if a token is 'complete' or 'incomplete'
9 years ago
Stephen Hess
bd3b8e7bbe
switched to pelias-text-analyzer package since that responsibility has been moved to there
9 years ago
Diana Shkolnikov
37d261c047
Removed a new test when merging
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
Diana Shkolnikov
201f4d4fb3
Convert parent WOF ids to valid Pelias ids to be used by /place
9 years ago
Diana Shkolnikov
928597e029
Fix admin parts parsing without spaces after delimeters
9 years ago
Diana Shkolnikov
7231e229d4
Convert parent WOF ids to valid Pelias ids to be used by /place
9 years ago
Peter Johnson
51279ce2cf
quattroshapes deprecation warning and wof fallback
9 years ago
Julian Simioni
b4fb62f2c9
Test that src/backend passes correct config to elasticsearch
9 years ago
Diana Shkolnikov
36b6adddfd
Add bounding_box parsing step
9 years ago
missinglink
cd16ff92b1
add common.diff() function for test debugging
9 years ago
Julian Simioni
616dd606a7
Add sources and layers sanitiser
...
This sanitiser can do a better job of determining when an invalid
combination of sources and layers was specified, and produce helpful
error messages.
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
Stephen Hess
3e8d1bfd9b
broke country-specific label tests out to own file for easier testing
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
Peter Johnson
49d37eafed
one config per query
9 years ago
Peter Johnson
4e43310288
german street/number naming convention
9 years ago
Julian Simioni
b188a2046c
Fix mismatching name of types preference parameter
...
The parameter in clean.types being set by `helpers/text_parser.js` was
"from_address_parsing", but the code in `helper/types.js` was expecting
"from_address_parser". This commit makes both use "from_address_parser"
and adds a test.
9 years ago
Julian Simioni
59b70f7c7e
Rename helper/query_parser to helper/text_parser
9 years ago
Julian Simioni
aa08fb9772
Add optional and required group parameter sanitizers
9 years ago
Julian Simioni
f3ba5411cd
Sort test file names
9 years ago
Peter Johnson
3a54a8b32f
fix label issues
9 years ago
Peter Johnson
2b9c3d79aa
rename outputGenerator -> labelGenerator
9 years ago
Diana Shkolnikov
ce32802368
Hotfix for confidence exception
9 years ago
Julian Simioni
68c9661c70
Remove all mappings other than helper/type_mapping
9 years ago
Julian Simioni
4df0f98b14
Add type list, and raw mappings to/from source/layer and type
9 years ago
Stephen Hess
947797f41e
added warning if any of boundary.circle.lat/lon/radius are supplied + tests
9 years ago
Stephen Hess
e90f70ce3d
added sanitizer that verifies that all parameters are single scalar values
9 years ago
Julian Simioni
03387722fb
Move _ids sanitiser tests to separate file
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
0348f36671
Remove warning when no size param specified
...
Added tests for _size sanitizer while in there.
9 years ago
Julian Simioni
4e74c4db86
Add autocomplete sanitiser
...
This is similar to the search sanitiser but with a more limited scope.
It doesn't support layers, sorces, or bounding boxes.
9 years ago
Stephen Hess
66bf2bb46b
added sanitizer for boundary country parameter
...
sets to undefined if input country not found as ISO2/3
9 years ago
Diana Shkolnikov
c069933d5b
Refactored layers and sources into a common targets module
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
Diana Shkolnikov
feb1b0a6cd
Update /reverse endpoint params and query as per API spec
9 years ago
Stephen Hess
c19d56697e
add _private sanitizer
9 years ago
Stephen Hess
55e31af238
extract truthy sanitizer to own file
9 years ago
Stephen Hess
e52c9e4ab9
moved details tests out to separate file
9 years ago
Peter Johnson
c0f20aabd3
refactor: clean up sorting conditions
9 years ago