The Nominatim docs say that "Free-form queries are processed first left-to-right and then right-to-left if that fails.". My understanding is that if query="part1, part2, part3" fails, it then searches for query="part3, part2, part1". What I'm trying to achieve is if that fails, the database then tries to return a less specific result so that we get some data.

I've seen multiple cases where query="house number street name, town, city, country" returns no results, but query="street name, town, city, country" or query="town, city, country" returns results. I'd like to get this less specific result without having to do multiple queries.

asked 16 Feb, 12:10

ryaner's gravatar image

ryaner
1623
accept rate: 0%


Nominatim doesn't support this (yet), it looks for all part of the query. Like spellcheck it's a long requested feature, as old as Nominatim itself (10 years). The next best option is doing multiple queries. If you administer your own Nominatim server you can enable CONST_Search_BatchMode (see search.php) where you can run multiple queries in one request. It's disabled on nominatim.openstreetmap.org

permanent link

answered 16 Feb, 12:55

mtmail's gravatar image

mtmail
3.9k1261
accept rate: 31%

Is there any way to make the result set fields returned from batch queries match that of a single query? Specifically when querying an address with get back a field called 'class' and via batch that field seems to be called 'category'. The lack of documentation around batch mode means I'm not sure if this is intentional or a bug somewhere?

(19 Feb, 14:28) ryaner

It's an undocumented and unsupported feature. There is probably a way if you change the PHP source code.

(19 Feb, 14:35) mtmail
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×599

question asked: 16 Feb, 12:10

question was seen: 239 times

last updated: 19 Feb, 14:35

powered by OSQA