elliotttate / beatsaver-laravel

Rewrite of beatsaver.com (https://github.com/beatsaver/beatsaver) using the laravel framework
https://discord.gg/8B44zqM
MIT License
39 stars 19 forks source link

Bug: multi key search returns no or wrong results #6

Closed Kojoley closed 6 years ago

Kojoley commented 6 years ago

The current API has score value which is useful to rate the search result (e.g. if search returned multiple entries, but the first has a big score with a decent gap to the second one - it may be considered the exact match; or if there are lots of results with a low score - the search request is too broad).

Also the quality of search seems to be lower with the new API (e.g. https://beatsaver.cyber-cortex.net/search/all/rammstein%20heil returns nothing while current API gives valuable output https://beatsaver.com/search.php?q=rammstein+heil).

Byorun commented 6 years ago

the score was part of elastic search, that is not part of my rewrite. But you are absolutely right about the search result.

Kojoley commented 6 years ago

the score was part of elastic search, that is not part of my rewrite.

I understand, but there must be some metric which you utilize to sort the search results by relevance (otherwise they will be sorted by primary key).

Byorun commented 6 years ago

all results from the search function are sorted by creation/update date not primary key

beatsaver commented 6 years ago

as a hotfix you could add a FULLTEXT index to mysql and search with that, it should work better and does sort by relevance, but its slow

Byorun commented 6 years ago

Its now fixed in the latest dev version https://beatsaver.cyber-cortex.net/search/all/rammstein%20heil https://beatsaver.cyber-cortex.net/search/all/rammstein+heil https://beatsaver.cyber-cortex.net/search/all/ramm%20heil https://beatsaver.cyber-cortex.net/search/all/ramm+heil

but there is sill no scoring visible to you but it is sorted by scoring