xna-cncnet-client icon indicating copy to clipboard operation
xna-cncnet-client copied to clipboard

Use AND logic for map searching

Open 11EJDE11 opened this issue 6 months ago • 8 comments

Currently map search shows matches for the exact string. This PR splits search string by space and requires all words for a match.

Improves usability - searching for "4 blitz" or "6 ffa" shows more relevant results:

[4] Hatay Blitz (2v2) [6] Sedona Pass FFA

11EJDE11 avatar May 30 '25 12:05 11EJDE11

Nightly build for this pull request:

  • artifacts.zip This comment is automatic and is meant to allow guests to get latest automatic builds without registering. It is updated on every successful build.

github-actions[bot] avatar May 30 '25 12:05 github-actions[bot]

Thanks, MB. I'd argue it should be the default for the examples I gave earlier. In my (admittedly small) amount of testing, I haven't seen any cases where it negatively impacts the experience, only positive changes. In any case, I won't be implementing this as a setting, so closing.

11EJDE11 avatar May 31 '25 01:05 11EJDE11

People use search to find map with exact name, not map name that contains words of search request in any combination

Why?

For example, I might memorize a 4-player map ends with Blitz but can't exactly spell the word "Hatay". So typing "4 blitz" does help me finding this map.

I don't think most users can correctly memorize the exact name

SadPencil avatar May 31 '25 11:05 SadPencil

Why?

For example, I might memorize a 4-player map ends with Blitz but can't exactly spell the word "Hatay". So typing "4 blitz" does help me finding this map.

I don't think most users can correctly memorize the exact name

I don't think we should break current exact match search. As i see, you want to merge this request anyway. Please, edit PR for search be able to find first with exact match and then with split match.

MahBoiDeveloper avatar May 31 '25 12:05 MahBoiDeveloper

I don't think we should break current exact match search.

How adding more search results breaks the current search?

Please, edit PR for search be able to find first with exact match and then with split match.

Even if a map exactly matches the search item, the split match is still useful. For example, Let's assume there are two maps, "unfair battle v2" and "unfair battle snow v2". The user wants to search for the latter, even if he/she types "unfair battle v2".

SadPencil avatar May 31 '25 21:05 SadPencil

I've fixed the issue SadPencil pointed out, and have added back the exact match to show those first, then AND matches after for MB.

11EJDE11 avatar Jun 02 '25 23:06 11EJDE11

I've fixed the issue SadPencil pointed out, and have added back the exact match to show those first, then AND matches after for MB.

~have you deduplicated the redults or not?~ seems deduplicated

SadPencil avatar Jun 03 '25 00:06 SadPencil

Yes, that's handled by var partialMatches = maps.Except(exactMatches).Where(gmm =>

11EJDE11 avatar Jun 03 '25 00:06 11EJDE11