iftechfoundation / ifdb-suggestion-tracker

Bugs and feature requests for a future IFDB update
10 stars 0 forks source link

Search results "Tags Matched" displays incorrectly #422

Open dfabulich opened 6 months ago

dfabulich commented 6 months ago

https://ifdb.org/search?searchbar=tag%3Apunyjam

There are two tags in IFDB, punyjam and PunyJam #3. This search will only search for games that have the punyjam tag.

Actual: For Submarine Sabotage, it says "Tags matched: PunyJam #3" Expected: "Tags matched: punyjam" (or get rid of "Tags matched" entirely… see below)

@salty-horse explains:

https://github.com/iftechfoundation/ifdb/pull/269#issuecomment-1873999295

It runs on the search results, and picks the first tag it finds that CONTAINS the searched tags, so if you search for punyjam, and the game has both punyjam and punyjam #3, it might say it matched on punyjam #3.

dfabulich commented 6 months ago

Maybe we should get rid of "Tags matched" entirely.

https://github.com/iftechfoundation/ifdb/pull/269#issuecomment-1871463220

I changed it to use a join, in a separate commit. You can decide which is better.

Based on tests, I think I'm correct in my assumption that in the current behavior, searching for multiple tags ANDs them. If that's the case, what's the point of each result having a label of "Tags matched: A B C"? Why not have those links at the top of the list? tags_matched