Julian Simioni
c20737f458
fix(boundary.country): use boundary.country as filter
...
By definition, all boundary.country query matches will either be
identical, or not a match. Thus, it does not make sense to put the query
clause for boundary.country in the `must` section of the query.
In theory, because our queries would generally combine this `must`
clause with others, there shouldn't be any performance improvement (or
regression) from this change.
However, semantically, this clause fits better as a `filter`, and in the
case of a bug causing a degenerate query with the `boundary.country`
query clause as the only one under the `must` section, this would have a
big impact.
6 years ago
Stephen Hess
004e3c02b1
completed switch to vs tests over fixtures
7 years ago
Stephen Hess
110a258130
added initial tests for using vs
7 years ago
Lily He
57b133ba42
check and set default for undefined boundary circle radius in reverse
8 years ago
Stephen Hess
b5c6c403cb
updated reverse boundary radius tests to lower value
8 years ago
Stephen Hess
10b1d28201
only query ES for non-coarse layers on non-coarse reverse requests
8 years ago
Diana Shkolnikov
9ff383cc2b
change the query module interfaces back to simple functions
8 years ago
Diana Shkolnikov
3888ae0385
change query module interfaces to allow for additional meta data
8 years ago
Julian Simioni
aa7942cbb9
Set up layer filtering for autocomplete and reverse
...
This was missed by me when working on https://github.com/pelias/api/pull/580 , but caught by the acceptance tests!
Unfortunately it was caught after going to production.
9 years ago
Peter Johnson
cb67dd58d8
refactor boolean query filtering as per: https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking_20_query_dsl_changes.html#_literal_filtered_literal_query_and_literal_query_literal_filter_deprecated
9 years ago
Peter Johnson
63301afeac
wow this is easy to get wrong, added a unit test
9 years ago
Diana Shkolnikov
9fa5fc5a77
calcSize became middleware (exposed and fixed bug in query defaults)
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
82ab899ecc
progress commit
9 years ago
Julian Simioni
f3acf3b308
Check for numeric value of lat/lon to avoid null island bug
...
Using the check-types module, check that lat/lon values are numbers,
instead of checking their truthyness, to ensure that queries for null
island work correctly.
9 years ago
Julian Simioni
109c28a588
Use flat point.{lat|lon} in query/reverse.js
9 years ago
Julian Simioni
4260442f59
Change boundary.circle params to flat string structure
9 years ago
Julian Simioni
66e1cab007
Whitespace
9 years ago
Stephen Hess
13635a2c16
added boundary.country to search and reverse queries (with test fixtures)
9 years ago
Diana Shkolnikov
feb1b0a6cd
Update /reverse endpoint params and query as per API spec
9 years ago
Julian Simioni
040871cbe4
Whitespace
9 years ago
Peter Johnson
d568c031a3
move stringify logic to tests, code clean up
9 years ago
Peter Johnson
1f13bafab0
refactor reverse & tests
9 years ago
Diana Shkolnikov
ab436d5dfb
Search query builder not checking all available admin values
...
Fixes #187
10 years ago
Harish Krishna
708c24195d
adding admin_boost
10 years ago
Harish Krishna
f78f49d857
moving sort logic.. popularity then population first!
10 years ago
Harish Krishna
5025b66a91
adding admin_weights instead of just boosting admin0
10 years ago
Harish Krishna
049a96efd6
flipping the popularity population order
10 years ago
Peter Johnson
ce611fd933
increase search radius to 500km
10 years ago
Diana Shkolnikov
7b5a2fafb9
Change query to use `terms` and add code coverage stats
10 years ago
Diana Shkolnikov
45ba29cc54
Add categories param to /reverse
10 years ago
Harish Krishna
aae256c93f
category scoring - weights are all hardcoded to 10 currently - requires to be tweaked
10 years ago
Harish Krishna
2d861aea7f
boosting admin0 values
10 years ago
Harish Krishna
79f33dee96
adding popularity to sort scoring function list
10 years ago
Harish Krishna
743c825b41
just using weights from pelias-suggester-pipeline (reducing dependency issues with another repo)
10 years ago
Harish Krishna
aa721b8749
moving groovy scripts to a file on disk @ elasticsearch/config/scripts to avoid dynamic script loading look at http://www.elasticsearch.org/blog/running-groovy-scripts-without-dynamic-scripting/ and https://github.com/pelias/scripts
10 years ago
Harish Krishna
1a740f16df
sorting function based on population and weights plus tests
10 years ago
Harish Krishna
5d7edd00e8
tests. adding sort to queries (although this should probably be decoupled from the api or the sort logic should be moved from elasticsearchbackend into api)
10 years ago
Harish Krishna
51f23c4410
expand/ reverse size
10 years ago
Peter Johnson
425fdf2e88
refactor reverse query
10 years ago