Skip to content

Conversation

@notbakaneko
Copy link
Collaborator

@notbakaneko notbakaneko commented Aug 26, 2025

Beatmap search query string parsing portion of #12148
Removes all usages of QueryHelper::queryString/simple_query_string in BeatmapsetSearch which isn't suitable for our supported syntax without more contortions and parsing to make it fit, at which point we might as well just parse it ourselves.

@notbakaneko notbakaneko self-assigned this Aug 26, 2025
@notbakaneko notbakaneko changed the title Feature/beatmapset search keyword parse Updated Beatmap search query string parsing Aug 26, 2025
@notbakaneko notbakaneko changed the title Updated Beatmap search query string parsing Updated Beatmap search query parsing Aug 26, 2025
@notbakaneko notbakaneko force-pushed the feature/beatmapset-search-keyword-parse branch from d6fc079 to 95c09fa Compare August 26, 2025 11:08
Copy link
Collaborator

@nanaya nanaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a quick check

throw new Exception('$clause should be associative array or Queryable.');
}

public static function tokenize(string $query): array
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the expected result? (also, tokenise?)

> QueryHelper::tokenize('"hello" "world"')
= [
    "exclude" => [],
    "include" => [
      ""hello" world"",
    ],
  ]

];

$mode = 'include';
$token = strtok($query, ' ');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should probably at least replace all kind of spaces to this normal space first. Full width space   is usually expected to act as normal separator in this context

@notbakaneko notbakaneko force-pushed the feature/beatmapset-search-keyword-parse branch 3 times, most recently from baf618a to c0b37a0 Compare August 28, 2025 07:31
@notbakaneko notbakaneko force-pushed the feature/beatmapset-search-keyword-parse branch 2 times, most recently from bd43fdf to 239697d Compare September 8, 2025 10:19
@notbakaneko notbakaneko force-pushed the feature/beatmapset-search-keyword-parse branch from 239697d to 71b7049 Compare November 5, 2025 03:04
@notbakaneko notbakaneko force-pushed the feature/beatmapset-search-keyword-parse branch from 71b7049 to 38c0a78 Compare November 19, 2025 02:32
@notbakaneko notbakaneko force-pushed the feature/beatmapset-search-keyword-parse branch from 38c0a78 to ef7643b Compare December 1, 2025 07:21
@notbakaneko notbakaneko marked this pull request as draft December 1, 2025 10:12
@notbakaneko
Copy link
Collaborator Author

Making test updates

…rently too flakey.

Keep the updated query string logic.
negative boost should be safe to test... maybe
Added note and skip asserting order for relevancy tests.
@notbakaneko notbakaneko force-pushed the feature/beatmapset-search-keyword-parse branch from ef7643b to c25d1a5 Compare December 11, 2025 12:47
@notbakaneko notbakaneko marked this pull request as ready for review December 11, 2025 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants