Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

leisure=dance is not found by name #29

Closed
Strubbl opened this issue Sep 12, 2023 · 4 comments
Closed

leisure=dance is not found by name #29

Strubbl opened this issue Sep 12, 2023 · 4 comments

Comments

@Strubbl
Copy link

Strubbl commented Sep 12, 2023

[x ] I have checked that my search works in Photon, which Acastus uses as a search backend

My search for the word Tanzkind does work in photon, but i cannot find this POI https://www.openstreetmap.org/node/5923759887 with Acastus. Does it support searching for dance schools?

@gjedeer
Copy link
Owner

gjedeer commented Sep 13, 2023

That is so odd, the API returns results:

https://photon.komoot.io/api/?q=tanzkind&lat=52.3879&lon=13.0582&location_bias_scale=20

https://photon.komoot.io/api/?q=tanzkind

I think the results displayed aren't for "tanzkind" but these of "tanz" or "tanzk" - could be some kind of throttling, or these results just arrived last and are displayed. Debouncing the input would help - and would be good for the server https://stackoverflow.com/questions/34955109/throttle-onquerytextchange-in-searchview

@Strubbl
Copy link
Author

Strubbl commented Sep 13, 2023

This is really strange. I just tried to workaround a throttling. For that i copy&pasted the whole word in the input field and just hit spacebar after this. But even this does not show the result.

@gjedeer
Copy link
Owner

gjedeer commented Sep 14, 2023

That is so much more interesting that it looked like...

I created an apk which logs the URLs sent, responses received etc. The exact URL for your query is:

https://photon.komoot.io/api?lat=53.123456789076576&lon=15.573857576874920&location_bias_scale=20&q=tanzkind

When I open that URL with Firefox, the JSON contains one result: the dance school you're looking for.

When I do:

curl https://photon.komoot.io/api\?lat\=53.123456789076576\&lon\=15.573857576874920\&location_bias_scale\=20\&q\=tanzkind

it returns 15 results, the ones you're seeing. The same when I do:

curl -X GET -H "User-Agent: Java/1.8.0_131" https://photon.komoot.io/api\?lat\=53.123456789076576\&lon\=15.573857576874920\&location_bias_scale\=20\&q\=tanzkind

which is how the Android request is most likely visible.

I have to think about it and see in Komoot documentation if maybe I'm doing something wrong. But it looks like they just don't like to be used by 3rd party programs (fair enough - I'm not going to work around if they do)

@gjedeer
Copy link
Owner

gjedeer commented Sep 15, 2023

This is fixed, version 1.28 should be on F-Droid soon. I hope you haven't skipped too many dance lessons because of this. Thanks for reporting.

@gjedeer gjedeer closed this as completed Sep 15, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants