Stephen Hess
b774cc617c
fixed spelling error
8 years ago
Stephen Hess
15b7c3fa57
uncommented tests
8 years ago
Stephen Hess
8072c73d42
removed unused dependency
8 years ago
Stephen Hess
6f4ec874fe
added special override condition for libpostal query/housenumber mixup
8 years ago
Stephen Hess
d5e993fc11
included `localadmin`, `macrocounty`, `macroregion`, and `dependency`
8 years ago
Stephen Hess
5178dc1cc9
added `trimByGranularity` to tests-to-run
8 years ago
Stephen Hess
681d689f51
fixed test names
8 years ago
Stephen Hess
9f350eb117
updated tests to reflect changes to query module
8 years ago
Diana Shkolnikov
e33c58bd42
Remove empty arrays from ES fixture
8 years ago
Diana Shkolnikov
d8e0b01358
Cleanup a few small things
8 years ago
Diana Shkolnikov
efa0818ade
Rename isDiff* functions to be more intuitive
8 years ago
Diana Shkolnikov
6049772a5d
Fix require path
8 years ago
Diana Shkolnikov
a8e82b018d
Refactor deduper and write additional tests
8 years ago
Stephen Hess
8339a66e91
updated query module to branch from hashcode
...
fixed tests to use `boost_mode` value of `multiply` instead of `replace`
8 years ago
Stephen Hess
876782ed3a
enabled all scores and filters
...
adjusted tests to account for new querying strategies, renamed all existing test fixture files to `*_original`. pointed query module to a PR for testing.
8 years ago
Stephen Hess
d682468096
adapted tests to latest query module output
8 years ago
Stephen Hess
c8ba57f98b
added support for `dnt` flag when logging fallback query
8 years ago
Stephen Hess
ae37add82b
extracted variables to conform to convention
8 years ago
Stephen Hess
165f6eadf1
added logging in case where query required fallback
8 years ago
Stephen Hess
42affa80f8
updated filename
8 years ago
Stephen Hess
484af8c044
changed from `text_parser` to `text_parser_addressit`
...
this ensures that `clean.parsed_text` is correctly converted to query as expected
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
8af8ba19f6
added call for fallback sanitiser middleware
8 years ago
Stephen Hess
40ed4e64c4
added new test
8 years ago
Stephen Hess
d8fb9323c2
added sanitiser wrapper for fallback to call addressit explicitly
8 years ago
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
2a9c25f8c4
added condition that `res.data` must be non-empty to return early
8 years ago
Stephen Hess
4952a0ed2b
added condition to exit early if there are already results in `res`
...
in order to accommodate falling back to the existing search strategy, the search controller must exit early if the `res.data` already exists.
8 years ago
Stephen Hess
e01ef7ac4d
copied the existing search query logic back in
8 years ago
Stephen Hess
45a0755f7d
added 2nd /search query call for fallback to existing behavior
...
while we're refining our process for integrating libpostal, the ES querying behavior will be:
- call ES with the fallback/geodisambiguation query
- if there are 0 results, call ES with the existing behavior
8 years ago
Stephen Hess
0a59e2750f
inject `query` to use
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
01d0338486
added text_parser that uses addressit format for autocomplete
...
rather than wholesale converting to libpostal in one release, the decision was made to only use libpostal for /search and not /autocomplete. Until such time that libpostal can be used for parsing autocomplete queries, text_parser_autocomplete.js will contain the converter between addressit and internal parsing format.
8 years ago
Stephen Hess
c257eb5fc3
added tests for new queries
...
left in place but commented out tests that will be supported when boundary, focus, and sources/layers issues are resolved.
8 years ago
Stephen Hess
f55aed2b1a
finished master rebase, checking in all-but-tests commit
...
rebase ended up being more complicated than was expected so i'm breaking this into a few commits
8 years ago
Stephen Hess
0aebf81ace
support new querying model
...
add support for FallbackQuery and GeodisambiguationQuery from the pelias-query module. GeodisambiguationQuery is used when the text-analyzer returns a single administrative area field. FallbackQuery is used otherwise.
8 years ago
Stephen Hess
58a3a91793
added `trimByGranularity` post-processing step
8 years ago
Stephen Hess
7495cad465
added middleware component to trim by result granularity
...
purpose in comments, cleans up from overly-verbose FallbackQuery
8 years ago
Stephen Hess
d3febe49cc
moved location of `matched_queries` to correct place
8 years ago
Stephen Hess
65f5cef9bf
updated proxyquire version
8 years ago
Stephen Hess
5821ae6e81
libpostal changes
...
- updated for libpostal interface
- added tests for text_parser
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
Stephen Hess
8d532adb3f
added support for `_matched_queries` in ES hits
...
this will make it easier to sort thru results from FallbackQuery by knowing which query was called
8 years ago
Stephen Hess
5f259d420b
updated text-analyzer version, removed unused module
8 years ago
Stephen Hess
c7e5ba2e2a
added postprocessing step to trim by granularity
8 years ago
Stephen Hess
0166940e1a
added debug
8 years ago