Stephen Hess
8c249c26f4
initialize esclient in routes/v1, eliminating need for src/backend
8 years ago
Stephen Hess
00234265e6
always inject backend instead of require'ing inside
8 years ago
Stephen Hess
511fbe41b4
removed unneeded require
8 years ago
Stephen Hess
52e7be556f
fixed spacing issues
8 years ago
Stephen Hess
be2a336038
updated naming from component to structured
8 years ago
Stephen Hess
1d6a6bc157
changed entry point to /v1/beta/component
8 years ago
Stephen Hess
6963cb43f0
added label assignment to component route
8 years ago
Stephen Hess
08f4aa4b95
renamed files to be more indicative of what the function is
8 years ago
Stephen Hess
d03a8c4586
added support for component geocoding
...
- created `/component` route
- broke out trimByGranularityComponent but could conceivably be combined with existing
- added `address` support to text_parser
- added `component` sanitizer wrapper
8 years ago
Stephen Hess
ff8fdf486f
moved label assign to before geocodeJSON for all routes
8 years ago
Stephen Hess
942a8ff0a3
removed redundant for pelias-labels
8 years ago
Stephen Hess
beb309ca07
moved assignLabels to fire before geojsonify
8 years ago
Stephen Hess
248b1299c8
added post-processing step to generate labels
...
injects label generation function for easier unit testing
moved label generation code to separate package
8 years ago
Stephen Hess
3763d0b503
renamed `sanitise` -> `sanitize`
8 years ago
Diana Shkolnikov
21d4bb63f3
feat: add accuracy field
8 years ago
Diana Shkolnikov
3cd342f2e7
add new confidence score middleware to routes
8 years ago
Stephen Hess
ae37add82b
extracted variables to conform to convention
8 years ago
Stephen Hess
8af8ba19f6
added call for fallback sanitiser middleware
8 years ago
Stephen Hess
45a0755f7d
added 2nd /search query call for fallback to existing behavior
...
while we're refining our process for integrating libpostal, the ES querying behavior will be:
- call ES with the fallback/geodisambiguation query
- if there are 0 results, call ES with the existing behavior
8 years ago
Stephen Hess
0a59e2750f
inject `query` to use
8 years ago
Stephen Hess
58a3a91793
added `trimByGranularity` post-processing step
8 years ago
Stephen Hess
246f9e7d43
added generatePermutations to middleware
8 years ago
Diana Shkolnikov
afc585bb87
pass config to controller in nearby router setup
9 years ago
Diana Shkolnikov
c38b67aeb4
Add nearby sanitizer and revert reverse to not have categories
9 years ago
Julian Simioni
610f4ce4f3
Fix missing parameter
...
This should have been in https://github.com/pelias/api/pull/595 , but was
misssed until found during testing on dev2
9 years ago
Julian Simioni
2557c68368
Use index name from config in controllers
9 years ago
Julian Simioni
c154325f3e
Redirect to /v1 if no legacy proxy specified
...
For when we have multiple active API versions, we have code to redirect
from one running API server to another. Right now, we've disabled the
beta/legacy API server and haven't released a V2 yet, so we currently
have no proxying configured.
Right now the default with no configuration is to simply return an
error. However that means that request to http://search.mapzen.com/
return that unfriendly error. We have a nice friendly /v1 page, so in
the case of no proxy being set up, it makes sense to redirect to that.
9 years ago
Diana Shkolnikov
201f4d4fb3
Convert parent WOF ids to valid Pelias ids to be used by /place
9 years ago
Diana Shkolnikov
7231e229d4
Convert parent WOF ids to valid Pelias ids to be used by /place
9 years ago
Diana Shkolnikov
36b6adddfd
Add bounding_box parsing step
9 years ago
Julian Simioni
79883594b8
Use clean.layers to determine types
...
This allows removing the types middleware and simplifies some code.
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
4e43310288
german street/number naming convention
9 years ago
Peter Johnson
c609ae3ccf
http friendly status codes. resolves #321
9 years ago
Diana Shkolnikov
553f9780c5
Remove admin matching when address is not parsed
9 years ago
Stephen Hess
8be249b701
added helper variables for readability
9 years ago
Stephen Hess
0b5172a452
initial stab at confidence score calculation based on distance from point.lat and point.lon
9 years ago
Diana Shkolnikov
9433d995b1
Fix attribution link
9 years ago
Diana Shkolnikov
73419342a6
Fix attribution link
9 years ago
Julian Simioni
4e74c4db86
Add autocomplete sanitiser
...
This is similar to the search sanitiser but with a more limited scope.
It doesn't support layers, sorces, or bounding boxes.
9 years ago
Peter Johnson
e726636c3d
merge with master
9 years ago
Diana Shkolnikov
c069933d5b
Refactored layers and sources into a common targets module
9 years ago
Julian Simioni
5d7f7ee4c0
Add /status controller
...
It's at the root level, and simply returns 200 with 'status: ok' as the
body.
9 years ago
Diana Shkolnikov
dd78f324ee
Compute distance for each result of reverse query
9 years ago
Peter Johnson
fa209c9b50
add autocomplete route, further query clean up
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
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
Diana Shkolnikov
562338635c
Confidence score calculation
...
Fixes pelias/pelias#120
9 years ago