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

Linked places should not appear in search index #722

Open
lonvia opened this Issue May 12, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@lonvia
Collaborator

lonvia commented May 12, 2017

Copied over from talk mailinglist:

On Thu, May 11, 2017 at 11:04:30AM -0700, Ben Discoe wrote:

Nominatim has been able to find waterway relations for at least a
couple years, now.

For example, if you search "Klamath River", Nominatim's top result is:
https://www.openstreetmap.org/relation/3624126

Which is great. But two days ago, I created another river:
http://www.openstreetmap.org/relation/7232264

Searching Nominatim for "Spoon River" currently gives "No results found".

Supposedly, Nominatim's database delay is small (minutes, not days).
Anyone know why it's failing to find a large, 2-day-old relation?

It's kind of a bug in Nominatim. The relation is there, see
http://nominatim.openstreetmap.org/details.php?osmtype=R&osmid=7232264
but search doesn't return it properly.

Feel free to stop reading here, but here are the boring details:

The problem is with the importance of the feature computed from the
wikipedia importance. It is lower than the default importance you
get without a wikipedia tag. Now what happens when you search for
the river is that it looks for the first couple of matching results
ordered by importance and it finds all the ways that make up the
relation (which are also correctly tagged with name=Spoon river)
because they have the higher default importance. Rechecking the
result it realises that all those ways are part of a waterway
relation and shouldn't be returned as separate results. So they
all get deleted again from the result list, leaving an empty list.
The relation you are looking for never makes it out of the database.
You can get it, if you ask for more results:
http://nominatim.openstreetmap.org/?q=spoon%20river&limit=50

The proper fix is to remove the ways that make up the relation
from the search index. I'm not sure how simple that actually is. I'll
look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment