Sort locations by distance away (fuzzily)

Bug #579374 reported by Kieran Fleming
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenSatNav
In Progress
Medium
Unassigned

Bug Description

Results from POI search are sorted by the server, but the text based search is sorted by best match. The current sorting should still be used but it needs to consider the distance away in the sorting as well.

Revision history for this message
chris_debian (cjhandrew) wrote :

Guys,

When I use Nominatim, this doesn't appear to be an issue. Can anyone confirm whether it still causes problems for them, or whether it has been solved?

Thanks,

Chris.

Revision history for this message
chris_debian (cjhandrew) wrote :

As Nominatim is now the default search tool, I am going to close this. If we experience further issues, it can be re-opened.

Chris.

Revision history for this message
droidguy (stan-berka) wrote :

Chris,
Have you closed it because the nominatim returns always the POIs sorted in the order of the distance away?
droidguy

Revision history for this message
chris_debian (cjhandrew) wrote :

droidguy wrote:
> Chris,
> Have you closed it because the nominatim returns always the POIs sorted in the order of the distance away?
> droidguy

Hi, droidguy.

Yes. How do you feel about that?

Chris.

Revision history for this message
Kieran Fleming (kieran-fleming) wrote :

I think it's dumb to close this bug as it's still a problem! Just because nominatum has the bug doesn't mean we can stop tracking it here.

Revision history for this message
chris_debian (cjhandrew) wrote :

kizza wrote:
> I think it's dumb

Sorry!

Revision history for this message
droidguy (stan-berka) wrote :

Chris and Kizza,
See this. When I search for the church near my house using text "saint clare church" on OSM map search, I get the correct single result. When I search for the same, using the same text from OSN Directions, I get 4 or 5 results and the right result is the last one.

Is it confirmed to be an OSM error? Even if yes, can we do something in OSN to workaround it?

droidguy

Revision history for this message
Kieran Fleming (kieran-fleming) wrote :

A perfect search ranking should weigh the following 3 factors:
* Matches what the user typed even if it's not perfect
* Distance away from the user
* Relative importance of the place (a large city should appear higher in the results than a street)

OSM Namefinder behaves differently depending on if you give it a 'near' clause. If you leave it out it uses a combination of relevance and place importance, if you put it in it will only look at distance away. In OpenSatNav the POI search uses the near clause but the text based one doesn't.

For Nominatum if we tell it we are near a place it will only return results within a certain radius which is limiting if you do intend to make a long trip. I haven't looked at the code so I don't know the actual distance. Here's the bug I logged about Nominatum:
http://trac.openstreetmap.org/ticket/2519

Revision history for this message
chris_debian (cjhandrew) wrote :

Thanks for explaining, Kieran; I didn't realize that.

Chris.

Revision history for this message
chris_debian (cjhandrew) wrote :

Does anyone know what we need to do next with this issue?

Chris.

Revision history for this message
droidguy (stan-berka) wrote :

I guess, we just need to implement a resorting of the results obtained from nominatim. Kieran, how would you suggest to combine the 3 criteria you suggest to apply?

Revision history for this message
Kieran Fleming (kieran-fleming) wrote :

I made the following change a while ago:
http://bazaar.launchpad.net/~kieran-fleming/opensatnav/release-1.0/revision/142

My 'perfect' matching idea really has to run on the server because we don't have enough information to work from. Specifying a search radius to Nominatum avoids the embarrassing results that are 1000's of kms away. I think this is good enough until Nominatum improves so I'm happy to mark this as fixed.

I would like some feedback on this, please give the testing apk a go and let me know.

Revision history for this message
Kieran Fleming (kieran-fleming) wrote :

I'm taking the 1.0 milestone off as this has been reported upstream and we'll have to wait for them

Changed in opensatnav:
milestone: 1.0 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.