osu-web icon indicating copy to clipboard operation
osu-web copied to clipboard

Fix beatmap search simple keyword exclusion still being included

Open nanaya opened this issue 8 months ago • 2 comments

Simplest fix I can think of 🤷 Resolves #12084.

  • [x] depends on #12130

currently, given map with tag "what" and no user tag, with search query -what:

  • ->should(['term' => ['_id' => ['value' => $this->params->queryString, 'boost' => 100]]]) no match -> no hit (correct)
  • ->should(QueryHelper::queryString($this->params->queryString, $partialMatchFields, 'or', 1 / count($terms))) matches excluded term -> no hit (correct)
  • ->should(QueryHelper::queryString($this->params->queryString, [], 'and')) matches excluded term -> no hit (correct)
  • ->should(['nested' => ['path' => 'beatmaps', ...]]) doesn't match excluded term -> hit (incorrect)

nanaya avatar Apr 22 '25 09:04 nanaya

@notbakaneko can you give this 15 mins and see if we can get this in? been hanging for a long time now 😅

peppy avatar Dec 11 '25 06:12 peppy

well, the goal for this pr was just a quick fix for the new bug introduced by the user tag and nothing else 🤷

nanaya avatar Dec 11 '25 13:12 nanaya

I wonder if user tag should just not be searchable with general query but require the tag= filter instead. It matches being a difficulty specific search and you probably don't want it to match unrelated difficulty when combined with other filters

nanaya avatar Dec 12 '25 07:12 nanaya

I think that depends on whether users are treating it like another plain text field.

I think that at least for exclusions in the general query, they should not be filtering based on fields you don't really see on the main results, and need an explicit filter to remove them, not just for user tags.

notbakaneko avatar Dec 12 '25 08:12 notbakaneko

short of switching the entire search to be based on beatmap (difficulty), it's probably better to keep the general search limited to beatmapset level attributes

nanaya avatar Dec 12 '25 09:12 nanaya