bsq-ports / BetterSongSearchQuest

Search and download songs with a lot of filtering and sorting options in Beat Saber
MIT License
20 stars 5 forks source link

Song Searching is Whackadoodled #17

Open L3Home opened 1 year ago

L3Home commented 1 year ago

Sorry, that's not a very descriptive word for the technical issue, but it's fitting. There are some issues with the search box in the results (above the list of returned songs).

After much testing of these problems, I can't seem to grasp precisely what the search is doing. I'm a programmer and even I can't figure out what might cause the behavior I'm seeing.

Example: If I type the single letter "m" into the search box, I get songs that include M as a single word, those using M as part of an acronym, which is all fine; but I also pull all songs whose titles (no matter how long) end with the letter m. For example, I would pull "M Diddy" and also "Digger Boom" (not real songs, just showing examples of the behavior).

I've noted also that the search includes results matching any word in the search string, not phrases. This makes it pretty hard to try to narrow results by including more of the song title. "mama rolling stone" for example will return songs with an artist, title, or mapper with even a partial match to "mama" OR "rolling" OR "stone" so you end up with thousands. There's no way to narrow it down without using only one word (trying for the least common) and then having to simply look down the list. Perhaps the search could be made inclusive with ALL words needing to match some part of the song to return as a result; if an exclusive search is needed, perhaps require " or " to be used between words?

It is also impossible to search with punctuation because the on-screen keyboard has no ability for symbols or anything other than letters and numbers. But the numbers don't count because it won't show any results as soon as a number is added to the search string.

Example: Searching for p90 or p90killr returns nothing. Just using "killr" will show his songs; but this isn't ideal, because you return a bunch of other things too.

And then my biggest complaint about the song search is that any sorting is totally ignored as soon as you type anything into the search box. It seems to return results in no discernable order; I use "Newest" typically, and I'll have songs in order with years 2021, 2021, 2020, 2023, 2021, 2022, 2023 again. Changing the sort order dropdown to something else and back doesn't fix it; I think it's totally ignoring the sort order.

FrozenAlex commented 1 year ago

Here is the search algo. It has a scoring system and testing it on quest was kinda horrible so I gave up. I made it as close to the PC version as possible but there is a bug with 2 songs appearing at the top of the search that are totally different from PC version. I tried to document it so anyone would be able to continue the work https://github.com/bsq-ports/BetterSongSearchQuest/blob/eddf4335477324a7638e36636e66ee901c01aa77/src/UI/ViewControllers/SongList.cpp#L495-L639

L3Home commented 1 year ago

Nice! I'll give it a look. I can already see that some of my suspicions about the string length conditions on the author matching had some basis in fact, which is heartening. I have some experience with pattern matching queries (I'm a sql data analyst by day) so hopefully I can help out with this.

L3Home commented 1 year ago

Sorry for the double reply post, but I was just thinking and wanted to check with you... would it be better/easier for you if I forked this project? In case I'm able to untangle any of the algo, I mean. Would that make it easier to review any proposed changes? I haven't had the experience of collab here before.

FrozenAlex commented 1 year ago

Sure, contributions are always welcome! Just make a fork, create a feature branch and do a pull request once you think it's ready.

L3Home commented 1 year ago

Sounds great, thanks for the opportunity!