Julian Simioni
1573f3a3fa
Move cmd.type setting logic to types helper
9 years ago
Julian Simioni
4037c49c4b
Store sanitised types from layers parameter
...
This moves the list of types created by sanitising the layer API
parameter from clean.layers to clean.types.from_layers. In subsequent
commits, types created from address parsing, and the
yet-to-be-implemented source parameter will also live in the clean.types
object.
This will allow moving logic to set cmd.type out of controllers, and
into separate logic that can be a littler smarter. Also, it will no
longer require the clean.default_layers_set flag to be passed all around
like a nasty global variable.
9 years ago
Julian Simioni
fb0cf514e9
Whitespace
9 years ago
Diana Shkolnikov
562338635c
Confidence score calculation
...
Fixes pelias/pelias#120
9 years ago
Diana Shkolnikov
db0e063d8c
Refactor controllers to be simple midddleware
...
Refactor search and doc controllers to allow for post-processing middleware
to handle geojson and response sending. Allows for a much more flexible routing scheme.
9 years ago
Harish Krishna
96a21570be
fixing layers related bug - adding a default_layers_set flag to clean obj.
10 years ago
Harish Krishna
1d24890b27
introducing target_layer that gets set part of input_parsing
...
- if input is less than 3 characters -> only hit admin layers
- if input suggests that its not a street address -> avoid hitting address layers
10 years ago
Harish Krishna
b9c4c673f5
Revert "removing searchType overhead"
...
This reverts commit ee4aa1b97a
.
10 years ago
Harish Krishna
ee4aa1b97a
removing searchType overhead
10 years ago
Harish Krishna
14c718bf1c
passing in an object (req.clean) instead of a boolean. Plus updated test
10 years ago
Harish Krishna
c99c5f712a
adding a parameter called details (defaults to false for all endpoint except reverse) + fixing tests
10 years ago
Harish Krishna
ff9e9973fc
switching searchType from the default 'query_then_fetch' to 'dfs_query_then_fetch' because we have multiple shards in prod http://www.elasticsearch.org/blog/understanding-query-then-fetch-vs-dfs-query-then-fetch/
10 years ago
Peter Johnson
0301fe8e74
search service
10 years ago
Harish Krishna
0a58bc9fea
adding type only if clean.layers are not undefined
10 years ago
Harish Krishna
ef95f5b67d
adding type
10 years ago
Peter Johnson
17134105d5
geojsonify /search and /reverse FTW
10 years ago
Peter Johnson
d6ae185cc1
validity check
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
554bbc62d3
adding search api endpoint and test (lat/lon in the query pending)
10 years ago
Peter Johnson
4323b0030b
progress commit
10 years ago
Peter Johnson
f48239a7d4
current dev branch
10 years ago