whosonfirst / whosonfirst-www-api

4 stars 2 forks source link

whosonfirst.places.search 'names' parameter not returning all names #48

Open stepps00 opened 7 years ago

stepps00 commented 7 years ago

The "names" parameter in the whosonfirst.places.search method doesn't seem to be returning all name values for records. One example is San Francisco.

San Francisco has a name:eng_x_colloquial value of "Bay Area", but it is not returned when called through the API. I'm having the same issue with values in the name:eng_x_unknown property.

Method:

curl -X GET 'https://whosonfirst.mapzen.com/api/rest/?method=whosonfirst.places.search&
access_token=e819e6916e91e36ed0b9348db6393d12&names=Bay Area&placetype=locality&
page=1&per_page=100'

Reponse:

{
    "places": [],
    "next_query": null,
    "total": 0,
    "page": 1,
    "per_page": 100,
    "pages": 0,
    "cursor": null,
    "stat": "ok"
}
thisisaaronland commented 7 years ago

Not sure why this is happening. Might be a tokenization thing. It should be in there but will need to investigate further:

https://github.com/whosonfirst/es-whosonfirst-schema/blob/master/schema/2.4/mappings.spelunker.json#L112-L119

nvkelso commented 7 years ago

I'm wary of exposing the colloquial names by default (there's a lot of noise around places that call themselves "Paris of the ...", but generally more names are better :)

thisisaaronland commented 7 years ago

The purpose of the names_all field is precisely to expose this stuff.

nvkelso commented 7 years ago

Colloqual is already exposed in “alt” (versus “names”).

On Wed, Jun 21, 2017 at 3:27 PM, Aaron Straup Cope <notifications@github.com

wrote:

The purpose of the names_all field is precisely to expose this stuff.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/whosonfirst/whosonfirst-www-api/issues/48#issuecomment-310223045, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0EO9wtrlIA7JtzHBTr4CIiNMENVmvhks5sGZjDgaJpZM4OBUyh .

thisisaaronland commented 7 years ago

The names (or names_all) field has always been one-stop shopping for all the possible combinations.