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
Diana Shkolnikov
127137f427
Add category filter to reverse query
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.
8 years ago
Peter Johnson
63301afeac
wow this is easy to get wrong, added a unit test
9 years ago
Peter Johnson
7d71e32104
bugfix: enable support for ?sources= filtering on /reverse
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
49d37eafed
one config per query
9 years ago
Peter Johnson
cb679888ff
better population and popularity boosting
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
Peter Johnson
c0f20aabd3
refactor: clean up sorting conditions
9 years ago
Peter Johnson
36185197aa
move query defaults to API repo
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
Peter Johnson
ce611fd933
increase search radius to 500km
9 years ago
Peter Johnson
e95c2efb54
resolves #139
9 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
Severyn Kozak
f477db140a
Pass params to sort(), addressing https://github.com/pelias/api/pull/113#discussion_r28972496 .
10 years ago
Severyn Kozak
144b72cb16
Boost results with exact text matches when _score ties.
...
query/sort.js
-Use the elasticsearch script introduced in
https://github.com/pelias/scripts/pull/7 to boost results with
exact text matches when documents' `_score`s are tied.
-Make `query/sort` export a function that creates the `sort`
query component, rather than the query component as a singleton,
to allow it to optionally add the exact-match script (that is,
when an `input` is present in `params`).
10 years ago
Harish Krishna
1a740f16df
sorting function based on population and weights plus tests
10 years ago
Harish Krishna
51f23c4410
expand/ reverse size
10 years ago
Peter Johnson
425fdf2e88
refactor reverse query
10 years ago
Peter Johnson
2edc546db0
formatting
10 years ago
Peter Johnson
7315159edf
formatting
10 years ago
Harish Krishna
15c63e405c
adding a naive reverse api endpoint (also, shares most of the search controller). updated search query to include a filter and a sort (calculating a bounding box, given a lat/lon)
10 years ago
Harish Krishna
5580485fd9
making full text search location aware
10 years ago
Harish Krishna
554bbc62d3
adding search api endpoint and test (lat/lon in the query pending)
10 years ago