iftechfoundation / ifdb

The software behind the Interactive Fiction Database (IFDB)
Other
23 stars 18 forks source link

Exact title matches should send you directly to the game #694

Open dfabulich opened 3 years ago

dfabulich commented 3 years ago

IFDB currently has a feature where if you search for a game and there's exactly one search result, instead of showing you the search results page, it takes you directly to the game itself.

For example, if you search for Gostak, it will take you directly to The Gostak. https://ifdb.org/search?searchbar=gostak

It's a nice feature, but even extremely unique exact title matches don't return just one search result. For example, if you search for Counterfeit Monkey, CM shows up at the top, but it doesn't send you straight to Counterfeit Monkey. https://ifdb.org/search?searchbar=counterfeit+monkey

It does seem to work if you wrap Counterfeit Monkey in quotes: https://ifdb.org/search?searchbar=%22counterfeit+monkey%22

But even that doesn't work if the title of the game is an ordinary word: https://ifdb.org/search?searchbar=%22violet%22

dougo commented 3 years ago

What if you really do want to find all games with the word "violet"?

dfabulich commented 3 years ago

I think the "violet" search might not be fixable in practice, but a no-quotes search for Counterfeit Monkey really oughta work.

Under the hood, I believe it's sorting by a computed "relevance" score. If the relevance score for one entry is way, way higher than the relevance score of other entries, e.g. or maybe specifically if it's an exact title match of a multi-word search, we should just take you to the game.