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
Stephen Hess
ab9b1dbafa
commented out deprecated AddressIt code
8 years ago
Stephen Hess
b1cf06720b
included generatePermutations in list of tests
8 years ago
Stephen Hess
abef8f1efa
initial stab at generatePermutations
8 years ago
Stephen Hess
246f9e7d43
added generatePermutations to middleware
8 years ago
Stephen Hess
080ad1cbf6
turned off multicore
8 years ago
Julian Simioni
01baa47a83
Merge pull request #645 from pelias/wof-venues
...
Add venues to list of wof layers
8 years ago
Peter Johnson
ab50dd5246
Merge pull request #653 from pelias/street_fallback
...
street fallback
8 years ago
Peter Johnson
a20c84fa83
update ciao tests to reflect updated error messages
8 years ago
Peter Johnson
53f89dc5c7
enable filtering osm by street layer
8 years ago
Diana Shkolnikov
b7ecd76a65
Merge pull request #639 from pmezard/update-test-ciao-layers
...
test/ciao: update valid layers list in reference output
8 years ago
Julian Simioni
b0c0a5fe5c
Add venues to Who's on First
8 years ago
Julian Simioni
908100d9c5
Explicitly set coarse alias rather than using WOF layers
...
Who's on First will have more than just coarse data now!
8 years ago
Patrick Mezard
50475c616b
test/ciao: reverse learnt to handle circle at some point
...
So fix the test pretending it does not.
8 years ago
Patrick Mezard
0f0cfd16d9
test/ciao: fix inverted negative latitudes in tests
...
See https://github.com/elastic/elasticsearch/issues/18458
8 years ago
Patrick Mezard
e53fcbc9d7
test/ciao: update valid layers list in reference output
8 years ago
Julian Simioni
6f09259cca
feat: Merge pull request #638 from pelias/expand-aussie-labels
...
Add provinces to Australian labels
8 years ago
Julian Simioni
270bcba8d3
fix: Merge pull request #633 from pelias/fix-country-labels
...
exclude `name` for `country` result labels
8 years ago
Alec Vulfson
63a6f230b0
Change name of function to be more general
8 years ago
Stephen K Hess
49b4857ccb
Merge pull request #643 from pelias/add-dependency-to-output
...
added `dependency` fields to output
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
Julian Simioni
86c5e7eaee
Merge pull request #637 from pelias/greenkeeper-pelias-query-8.5.0
...
Update pelias-query to version 8.5.0 🚀
8 years ago