Julian Simioni
e71fb7cfd4
Whitespace
9 years ago
Diana Shkolnikov
f7044d2435
Add content for `attribution` static endpoint
...
Fixes #212
9 years ago
Julian Simioni
6f0ad678eb
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
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
Julian Simioni
2fce64f75a
Move files
9 years ago
Julian Simioni
4e74e9b681
Whitespace
9 years ago
Harish Krishna
e5f783567f
remove all things that involved suggester including query mixer
...
keeping the suggest sanitizer for suggest/nearby wherein lat/lon are required
10 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
Severyn Kozak
29838e5b8c
Move code that needs to run only once.
...
controller/index.js
-Move all of the index page HTML "initialization" code that only
needs to run once, like markdown compilation and `style`
prepending, out of the request handler.
10 years ago
Diana Shkolnikov
99ee2d95a3
Change to readFileSync and update test to use proxyquire
10 years ago
Diana Shkolnikov
1d45b20268
Load markdown file into memory and check if client requested html
10 years ago
Harish Krishna
14c718bf1c
passing in an object (req.clean) instead of a boolean. Plus updated test
10 years ago
Harish Krishna
a91cb23ea4
adding a new file DOCS.md (same as https://github.com/pelias/api/wiki/API-Endpoints ), modifying controller/index.js to return text/html instead of application/json by default. Using markdown module to convert MD to HTML. Fixing tests (removed test/jsonp.coffee)
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
Harish Krishna
bcf823c519
cleanup + tests
10 years ago
Harish Krishna
fc7f6cb768
removing suggest_nearby, replacing suggest with suggest_multiple, commenting out a couple of tests for right now.
10 years ago
Harish Krishna
9afed3caef
adding query mixer for suggest and suggest/nearby
10 years ago
Harish Krishna
2b2414d879
using multiple suggesters but one query
10 years ago
Harish Krishna
69a13e9105
fixing all the js lint related issues (lintified)
10 years ago
Peter Johnson
ab71ccc4a5
id fix for /suggest/nearby
10 years ago
Peter Johnson
e4496763ad
id fix, formatting
10 years ago
Harish Krishna
407c32e782
suggest_near_me to /suggest/nearby and suggest_near_me.js to suggest_nearby.js
10 years ago
Harish Krishna
886aa498f5
bringing back vanilla suggest (suggestions based on lat/lon/zoom only) - calling it suggest_near_me and adding a new endpoint (plus tests)
10 years ago
Harish Krishna
dbd800b97f
maintain the order
10 years ago
Harish Krishna
f1d13c1337
consolidating suggest_poi and suggest_admin into one suggest endpoint. fixing tests (more tests to come)
10 years ago
Peter Johnson
6ddbe86ac5
perform mget during suggest. requires suggester output to be a gid
10 years ago
Peter Johnson
e24a467e96
suggest service
10 years ago
Peter Johnson
0301fe8e74
search service
10 years ago
Peter Johnson
2ee32f1892
mget service
10 years ago
Harish Krishna
7f2206d75b
moving things around
10 years ago
Harish Krishna
81b3668b30
get to doc
10 years ago
Harish Krishna
b828a05b01
simplifying things, DRY - one endpoint 'GET' handles single/multiple requests. plus test coverage
10 years ago
Harish Krishna
23e6cfbef7
mget for real - first pass (experiencing problems with the backend client)
10 years ago
Harish Krishna
fb6947e3fe
/get endpoint - controller and sanitizer
10 years ago
Harish Krishna
b4f7366ba1
fine tuning 5-3-1 and admin logic
10 years ago
Harish Krishna
b6b0c80f30
5/3/1 precisions for suggest that start with a number or if more than 3 characters. if its less than 3 characters give preference to admins
10 years ago
Harish Krishna
db29e85a3c
precision as an array [3,1] resulted in mostly precision:1 values. so, splitting it up
10 years ago
Harish Krishna
e75aac5570
when query is eual to or less than three letters - give admin* preference (with precision 1,3) and then fallback to pois.
10 years ago
Harish Krishna
81c064308f
equal distribution (mostly equal to the size requested or less)
10 years ago
Harish Krishna
6b192d598d
removing poi3 (mostly redundant) - deduping the results
10 years ago
Harish Krishna
a824d209aa
play with precisions
10 years ago
Harish Krishna
0a58bc9fea
adding type only if clean.layers are not undefined
10 years ago