Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

limit=1 gives no results. But without this parameter or with limit=2 all is fine #4683

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 2 comments

Comments

@openstreetmap-trac
Copy link

Reporter: karussell
[Submitted to the original trac issue database at 8.08pm, Sunday, 11th November 2012]

Example URLs:

http://nominatim.openstreetmap.org/search?format=json&q=hamburg&limit=2
=> correct result

http://nominatim.openstreetmap.org/search?format=json&q=hamburg&limit=1
=> no result

@openstreetmap-trac
Copy link
Author

Author: lonvia
[Added to the original trac issue at 10.39pm, Tuesday, 13th November 2012]

The linked_place_id is the culprit here. The search for places does not take it into account but gets the limit. The subsequent lookup in the placex table does look at linked_place_id and reduce the already limited results further.

The easiest fix I can see is to internally work with a limit that is twice the requested limit. That should cover the worst case scenario but also doubles the work load in the worst case. Any other ideas?

@openstreetmap-trac
Copy link
Author

Author: lonvia
[Added to the original trac issue at 8.42pm, Saturday, 17th November 2012]

Fixed it now by increasing the limit.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant