Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make reverseInPlan true by default #293

Closed
chmielas opened this issue Jun 29, 2015 · 2 comments
Closed

Make reverseInPlan true by default #293

chmielas opened this issue Jun 29, 2015 · 2 comments

Comments

@chmielas
Copy link

Hello,
I notice that at my local instance of Nominatim there is a difference between browser and wget
request:

For address http://myserver/nominatim/search.php?q=GERMANY+BAD+SCHWALBACH+65307+pfahlweg+1&polygon=0&format=xml&addressdetails=1
from brower I get 3 "place" nodes in XML (this is ok )
osm - browser
but wget returns following message (there is no "place" nodes)

local wget

for command

wget --output-document file.log 'http://myserver/nominatim/search.php?q=GERMANY+BAD+SCHWALBACH+65307+pfahlweg+1&polygon=0&format=xml&addressdetails=1'

Request to nominatim site

wget --output-document file.log 'http://nominatim.openstreetmap.org/search.php?q=GERMANY+BAD+SCHWALBACH+65307+pfahlweg+1&polygon=0&format=xml&addressdetails=1'

returns full result
remote wget

I think that I need to fix/change some settings in my installation but I don`t have idea what I should change. Maybe sombody
had similar issue ?

Regards,
Piotr

@mtmail
Copy link
Collaborator

mtmail commented Jun 29, 2015

Hi Piotr,

I see the same with my installation

Inside a browser you're sending the accept-language header, in your case pl.pl-Pl;q=0.95,en-US;q=0.89;... By default on command-line you don't send it and thus the default gets set to en.

  • curl "http://SERVER/nominatim/search.php?q=GERMANY+BAD+SCHWALBACH+65307+pfahlweg+1&polygon=0&format=json&addressdetails=0"
    no results
  • curl "http://SERVER/nominatim/search.php?q=GERMANY+BAD+SCHWALBACH+65307+pfahlweg+1&polygon=0&format=json&addressdetails=0&accept-language=en"
    no results
  • curl "http://SERVER/nominatim/search.php?q=GERMANY+BAD+SCHWALBACH+65307+pfahlweg+1&polygon=0&format=json&addressdetails=0&accept-language=de"
    no results
  • curl "http://SERVER/nominatim/search.php?q=GERMANY+BAD+SCHWALBACH+65307+pfahlweg+1&polygon=0&format=json&addressdetails=0&accept-language=pl.pl-Pl;q=0.95,en-US;q=0.89;"
    several results

That explains the difference between terminal and browser, but it doesn't explain why the address doesn't get found.

I tried pfahlweg+1,65307,BAD+SCHWALBACH,GERMANY and that worked fine. Do you have your addresses structured enough to order them small...large? Or even use structured parameter (http://wiki.openstreetmap.org/wiki/Nominatim, look for street=)?

@lonvia
Copy link
Member

lonvia commented Jun 29, 2015

The query is in reverse order, which Nominatim will only consider for certain accept-languages. Try setting ReverseInPlan per default to true about here.

We really should be making this the default. It has been working well on osm.org for ages.

@lonvia lonvia changed the title Api - difference between browser and wget Make reverseInPlan true by default Aug 8, 2015
@lonvia lonvia closed this as completed in c9d7015 Aug 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants