Diana Shkolnikov
67e034f5f2
Rename `source` to `sources`
...
... with a dash of refactoring thrown in for good measure
9 years ago
Peter Johnson a.k.a. insertcoffee
47157aa4cc
Merge pull request #244 from pelias/distance
...
Distance
9 years ago
Peter Johnson
9326215fa7
Merge branch 'master' of github.com:pelias/api into distance
9 years ago
Peter Johnson a.k.a. insertcoffee
d7aeeb604d
Merge pull request #242 from pelias/reverse
...
Update /reverse endpoint params and query as per API spec
9 years ago
Diana Shkolnikov
dd78f324ee
Compute distance for each result of reverse query
9 years ago
Diana Shkolnikov
feb1b0a6cd
Update /reverse endpoint params and query as per API spec
9 years ago
Julian Simioni
aea10ea95f
Merge branch 'search_and_reverse_lat_lon'
9 years ago
Julian Simioni
96c58e8658
Rename /reverse lat/lon to point.lat/lon
9 years ago
Julian Simioni
3176a61596
Rename /search lat/lon to focus.point.lat/lon
9 years ago
Julian Simioni
6c1cfbb4ad
Compare latitude values only, instead of full sanitiser output
9 years ago
Julian Simioni
0d23792591
Split geo sanitiser into geo_reverse and geo_search
...
Common functions are moved to geo_common. This is required to allow
separate behavior for search and reverse.
9 years ago
Julian Simioni
5d69c8016b
Remove lat/lon params from tests that don't use it
...
This just removes clutter and possible confusion from our test cases.
9 years ago
Julian Simioni
fd3b12cfa9
Remove all references to non-existent zoom parameter
9 years ago
Julian Simioni
040871cbe4
Whitespace
9 years ago
Peter Johnson
155337eb3f
refactor text parsing to seperate module
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
a629f2e1b6
bump dep
9 years ago
Peter Johnson
d568c031a3
move stringify logic to tests, code clean up
9 years ago
Peter Johnson
0d00e19825
remove debugging
9 years ago
Peter Johnson
fa209c9b50
add autocomplete route, further query clean up
9 years ago
Peter Johnson
dfa851ec5c
bugfix
9 years ago
Peter Johnson
2f8169ac10
remove unused sort conditions
9 years ago
Peter Johnson
a670e9d9d1
Merge branch 'master' of github.com:pelias/api into query
9 years ago
Peter Johnson
72432066c6
add (commented) missing query params
9 years ago
Peter Johnson a.k.a. insertcoffee
5004532c13
Merge pull request #229 from pelias/query
...
merge query changes
9 years ago
Peter Johnson
7e7e7083c2
resolve merge conflict with master
9 years ago
Peter Johnson
22322eaa32
change param:input to param:text
9 years ago
Peter Johnson
05bdf784e0
merge conflicts from pulling: source_parameter
9 years ago
Peter Johnson
1f13bafab0
refactor reverse & tests
9 years ago
Julian Simioni
745bdcece0
Merge branch 'remove-token-based-layer-filter'
9 years ago
Julian Simioni
139cb22127
Remove layers limiting on queries with few tokens
...
Primarily as a performance optimization, but also to attempt to return
more relevant results, only admin and POI layers were queried when the
text input consisted of only one or two tokens, and there weren't any
numbers. However as shown in #194 that is a bit too optimistic, mostly
in contries other than the USA.
Fixes #194
9 years ago
Julian Simioni
13d1a3861e
Merge branch 'input-text'
9 years ago
Julian Simioni
8c420bb1cd
Use text param in docs containing successful queries
9 years ago
Julian Simioni
cb2f1172e3
Use text parameter in ciao tests
9 years ago
Julian Simioni
39c5cb671d
Update docs for search and suggest
9 years ago
Harish Krishna
86424b8bbe
Rename `/search?input`, replacing it with '/search?text' parameter instead
...
changing parameter name input to text
https://github.com/pelias/api/issues/172
Rebased by @orangejulius
9 years ago
Julian Simioni
d9ede52e1b
Remove extra input paremter from reverse unit tests
...
Not strictly required for this change, but I noticed there was an input
parameter to lots of unit tests for the reverse endpoint. Reverse
doesn't take an input(or text) parameter at all, so these are just
extra, and probably came from a copy/paste in the tests.
9 years ago
Julian Simioni
dc6ed3d6a9
Remove unused suggest endpoint unit tests
9 years ago
Julian Simioni
6e8a54d500
Merge branch 'source_parameter'
9 years ago
Julian Simioni
f6fea21782
Use hasOwnProperty instead of comparing against undefined
9 years ago
Julian Simioni
6dbb4f8b08
Expose list of document types sent to Elasticsearch
9 years ago
Julian Simioni
d45b09b0b3
Add comments to type helper
9 years ago
Julian Simioni
ade4ce8b17
Add types middleware
...
This middleware looks at the list of types that will be sent to
Elasticsearch, if it's an empty array, it sends an error response before
Elasticsearch is even quieried, because Elasticsearch interprets an
empty type array as "search anything" rather than the intended "don't
search anything".
9 years ago
Julian Simioni
103a52cff5
Calculate intersection of types requested by source and layers params
9 years ago
Julian Simioni
b4e7793426
Fix reference to geoname
...
This is just in a unit test, so it technically passes, but geonames is
not a valid layer option (geoname, singular, is used instead), so it's
best to correct.
9 years ago
Julian Simioni
3383fa0321
Add source parameter sanitiser
9 years ago
Julian Simioni
426189e87f
Add sources -> types mapping file
9 years ago
Julian Simioni
2ebc935295
Rename query/indidces to query/types
...
It didn't really contain a list of indices.
9 years ago
Julian Simioni
6f92189519
Remove default_layers_set flag!
...
After refactoring, this flag is no longer needed, as all areas of the
code that care about layers do so by setting a key within clean.types,
and then the types helper intelligently combines those together later.
9 years ago