Skip to content
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

Wildcards do not work correctly in level search #724

Open
harriluoma opened this issue Dec 23, 2024 · 3 comments
Open

Wildcards do not work correctly in level search #724

harriluoma opened this issue Dec 23, 2024 · 3 comments

Comments

@harriluoma
Copy link

Hello, I'm zebra. I posted this already on mopolauta but as I saw there is this kind of cool github site I'm not posting this also here. So the basic problem is that I cannot find all levels with "zebra" in their name.

There seems to be multiple problems with level searches:

  • The "quick search" (https://elma.online/search?q=*zebra&t=level) doesn't seem to allow wildcards even if the help says so. I tried to search all levels which have "zebra" in their name. I tried the search "*zebra" and "?zebra" and "zebra" but it doesn't show anything. But if I search "4zebra" it finds some levels. So it seems that the wildcard system doesn't work there.
  • In the "advanced search" (https://elma.online/levels/search) the wildcards seem to work a bit better but the results seem to be a bit random. If I search for "zebra" levels and click also "Unfinished" option from the "Finished" dropdown list, it sometimes shows "zebra" levels, sometimes only "4zebra*" levels and sometimes some random levels without any "zebra" in their name.
  • In the "advanced search" there is another problem: it doesn't show more than 25 first levels. Then if I try to click next page arrow at the bottom of the level it just shows the same levels over and over again.

So at the moment there is no way to search for all levels which have "zebra" in their name.

@metsavir
Copy link
Collaborator

metsavir commented Dec 23, 2024

https://elma.online/levels/search?finished=all&q=*zebra*&page=0&order=asc works for me. Also changing page works. Total count isn't resolved since it is too slow for this advanced search.

I guess seeing the same levels when clicking next happens because there's 10s timeout in frontend and queries can be slow. Getting results straight from api like https://api.elma.online/api/level?page=0&pageSize=100&order=asc&finished=all&battled=all&q=*zebra* could work? 🤷

@harriluoma
Copy link
Author

harriluoma commented Dec 23, 2024

Thanks Ismo.

Well, the advanced search seems to work at the first time after browser restart. After that it's random or does not show anything.

Also changing page works.

It seems that 1st and 2nd page worked now but 3rd page was same as 2nd page and 4th page was same as 2nd page.

Getting results straight from api like https://api.elma.online/api/level?page=0&pageSize=100&order=asc&finished=all&battled=all&q=*zebra* could work? 🤷

Ok, got some html page there which actually answered my original question. Would be still nice to get the searches working :)

@metsavir
Copy link
Collaborator

It seems that 1st and 2nd page worked now but 3rd page was same as 2nd page and 4th page was same as 2nd page.

Ye, from 2nd to 3rd and from 3rd to 4th page search takes too long and api call fails silently. Page "changes" but shows results from latest successful api request. Would be nice to see some error message there at least. 🤔

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

No branches or pull requests

2 participants