Stephen Hess
165f6eadf1
added logging in case where query required fallback
8 years ago
Stephen Hess
42affa80f8
updated filename
8 years ago
Stephen Hess
46d58cafb0
renamed `_text_autocomplete` to `_text_addressit`
8 years ago
Stephen Hess
ad5d2bf36a
add early exit condition to stop unneeded re-parsing
...
This is required in the case where the libpostal parse + ES search was successful (res.data is non-empty) so we want to skip falling back to the current production behavior.
8 years ago
Stephen Hess
d8fb9323c2
added sanitiser wrapper for fallback to call addressit explicitly
8 years ago
Stephen Hess
af7de7613f
updated to reflect @missinglink's comments
...
the rebase was brutal, i thought that i caught everything, thx for checking
8 years ago
Stephen Hess
85dab16869
refactored search sanitiser tests
...
the tests removed were testing far more than was appropriate since the functionality of the individual sanitisers is tested elsewhere. in this case, the test has been reduced to just testing that all the sanitisers were actually called.
8 years ago
Stephen Hess
486f25663a
switched autocomplete sanitiser wrapper to addressit text sanitiser
8 years ago
Stephen Hess
b612b2750e
added addressit support for autocomplete via separatee text sanitiser
...
this commit combines the other sanitiser/_text.js and addressit parser logic from text-analyzer into one module for easier integration until such time that libpostal is ready for autocomplete
8 years ago
Stephen Hess
c18baaf775
fixed text analysis tests
...
proxyquire is now used because the text_analyzer package requires node_postal which isn't guaranteed to be available
8 years ago
Julian Simioni
c5e5bbcf56
Add boundary.country filter to /v1/autocomplete
8 years ago
Diana Shkolnikov
c38b67aeb4
Add nearby sanitizer and revert reverse to not have categories
9 years ago
Diana Shkolnikov
cc9c4148bb
Refactor geojsonify code and add ability to pass in clean query params
9 years ago
Diana Shkolnikov
07c637f5a6
Include a new pelias-categories module for category validation
9 years ago
Diana Shkolnikov
68c6b15e0f
Add categories sanitizer to reverse
9 years ago
Diana Shkolnikov
818711f509
Add categories sanitizer to search
9 years ago
Diana Shkolnikov
24c7370ce7
Add categories sanitizer to autocomplete
9 years ago
Diana Shkolnikov
1c6436d123
Update categories sanitizer and implement unit tests for it
9 years ago
Alec Vulfson
254b7ff66b
Updated warning for boundary.circle
9 years ago
Peter Johnson
7f18561595
remove focus.viewport API
9 years ago
Peter Johnson
791052e259
cleaner code: replace while() statements
9 years ago
Peter Johnson
c317d4f321
fix/improve coordinate wrapping function, added more tests
9 years ago
Peter Johnson
5b8a9a31d2
wrap coordinates at poles
9 years ago
Alec Vulfson
af723cd430
Cleaned up code for accepting short sources in gid
...
Removed an extraneous if statement
9 years ago
Alec Vulfson
4dc0f90088
Allow shortened names of sources to be used in gid
9 years ago
Peter Johnson
52c35cb37d
allow single non-numeric chars, change boost_mode to 'replace' for function_score queries
9 years ago
Julian Simioni
c9d87f7b0c
Add a separate default distance for coarse reverse
9 years ago
Julian Simioni
05baed7b51
Whitespace
9 years ago
missinglink
05240626fd
handle addressit case where parsed_text.street is produced and parsed_text.name is not
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
Julian Simioni
abbd314ee8
Change deprication message to present tense
9 years ago
Peter Johnson
51279ce2cf
quattroshapes deprecation warning and wof fallback
9 years ago
Peter Johnson
00b123adfb
enable ?source=s and ?layers params for autocomplete
9 years ago
Peter Johnson
8431763a12
fix handling of ?size= param for autocomplete
9 years ago
Julian Simioni
d5b818ea84
Fix typo
9 years ago
Julian Simioni
e97d72d7b6
Send warning when sources=quattroshapes
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
Julian Simioni
9ec2cd41d9
Remove unused file: sanitiser/_source.js
...
It was replaced by the dual purpose sanitiser/_targets.js
9 years ago
Julian Simioni
769f190eab
Replace depricated Lodash function unique with uniq
...
See https://github.com/lodash/lodash/wiki/Changelog#jan-12-2016--diff--docs
9 years ago
Julian Simioni
cb7b38bc75
Replace check-types depricated unemptyString with nonEmptyString
...
See https://www.npmjs.com/package/check-types#what-changed-from-4x-to-5x
9 years ago
Julian Simioni
f4a5dd812b
Replace depricated Lodash function contains with includes
...
See https://github.com/lodash/lodash/wiki/Changelog#jan-12-2016--diff--docs
9 years ago
Julian Simioni
0e78167f17
[/place] Accept any valid layer for geonames
...
Instead of checking if the source/layer combination for geonames is
valid, always use the geoname type if the source is set to geonames,
regardless of which layer is in the gid.
This helps us better handle the case where people directly take gids
from our API responses.
Note: this functionality shouldn't be permanent and should be removed
once our new source/layer mapping system is in.
9 years ago
Peter Johnson
49d37eafed
one config per query
9 years ago
Julian Simioni
db895c05b7
Rename `from_address_parser` key to `from_text_parser`
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
Peter Johnson
c609ae3ccf
http friendly status codes. resolves #321
9 years ago
Julian Simioni
06b44e5355
Disallow specifying both focus.point and focus.viewport
9 years ago