Severyn Kozak
7462e6bc80
Move sort array into createExpectedQuery().
...
test/unit/query/search.js
-The fact that it's a singleton was causing problems because at
least one of the tests directly modifies it (this was one of the
reasons why the base query itself was moved into
`createExpectedQuery()`).
-Move it into `createExpectedQuery()` as well.
10 years ago
Severyn Kozak
32a3515d05
Use createExpectedQuery() instead of writing them out.
...
test/unit/query/search.js
-Rather than writing out full elasticsearch queries as object
literals, use `createExpectedQuery()` as much as possible.
Reduces duplication.
10 years ago
Severyn Kozak
eca8a82818
Remove singleton expected query object.
...
test/unit/query/search.js
-Rather than maintaining a "singleton" expected query object,
which poses problems for tests that want to slightly modify it
(for instance, by conditionally adding a constraint to
`filter.bool.must`), make a function that returns it on demand,
thereby creating a new one each time.
10 years ago
Severyn Kozak
1f25303523
Quote properties.
...
(query/sort, test/unit/query/search).js
-Address @dianashk's comment:
https://github.com/pelias/api/pull/113/files#r29764750
10 years ago
Severyn Kozak
d7c4409e20
Fix failing tests.
...
test/unit/query/(search, sort).js
-Fix the tests that started failing as a result of 144b72c
.
10 years ago
Harish Krishna
aae256c93f
category scoring - weights are all hardcoded to 10 currently - requires to be tweaked
10 years ago
Harish Krishna
f13f1cdf2c
tests
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
9013b4484e
fixing tests
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
2f89cbd528
tests that test optional lat/lon for search and suggest endpoints
10 years ago
Harish Krishna
b6d1f1d497
test valid search query without bbox (falls back to 50km distance query)
10 years ago
Harish Krishna
245abd7809
elasticsearch-backend now only accepts vertices and not latlon as properties
10 years ago
Harish Krishna
ebf162f29e
search with optional bbox - initial commit +tests
10 years ago
Harish Krishna
69a13e9105
fixing all the js lint related issues (lintified)
10 years ago
Peter Johnson
8b97976022
refactor search query
11 years ago
Harish Krishna
5ee018bcf3
fixing the tests
11 years ago