Closed rinigus closed 7 years ago
I'm not quite comfortable just adding UI, especially to suit a worst case – IMHO OSM data is really bad for nearby POI search. OSM types are very unintuitive, e.g. something as common as grocery stores are very difficult to find, and names are inconsistent, sometimes wrong, and sometimes duplicated, e.g. in Finnish "Posti" used as name for both post offices and post boxes.
So, I'd first ask, is there a downside to always doing a search for both type and name separately and combining the results? Is there a case where that returns a significant amount of unwanted results?
I'd imagine you'd usually want loose rather than strict search criteria, maybe even forming a joint string {name} {type}
and doing some fuzzy match against that. Consider for example someone looking for "sushi restaurant", they'd probably want to find name="Tokyo Sushi"
, type="restaurant"
.
Fair enough, I should try to mix type and name and reply to your question. Making it fuzzy would be difficult and would require major rework. However, its simple to check type and name for substrings and combine the results. That would probably be sufficient and I'll report back here.
OK, looks like it works good enough. I am closing the issue and will be using a general query for type or name matching.
According to the search dialog presented by "Nearby Venues", POIs are searched by type. However, from inspecting Foursquare and Nominatim URLs, it seems to me that they would find venues by name as well if I would type the name as a type. OSM Scout Server, however, makes "type" as it is - as a type of the venue and looks into OSM type tag.
I have just finished the version of "Nearby" search which is backed by geocoder-nlp. This search accepts
poitype
andname
options. When only one is specified, it would take that one to search for POI. When the both are specified, its using them both with logicalAND
. That way you can specify cafe and its name, for example. I think its a correct handling of the situation, but it differs from the current approach.I wonder, is it possible to add "Name" into Nearby Venues dialog? Its probably possible to do so as a specific OSM Scout Server option, but that would probably feel odd.
There is also an option to use logical OR and, using the current dialog, search for type or name.
Would be great to get your thoughts on it.