-
Notifications
You must be signed in to change notification settings - Fork 409
Updated Beatmap search query parsing #12364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Updated Beatmap search query parsing #12364
Conversation
d6fc079 to
95c09fa
Compare
nanaya
left a comment
There was a problem hiding this 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 |
There was a problem hiding this comment.
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, ' '); |
There was a problem hiding this comment.
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
baf618a to
c0b37a0
Compare
bd43fdf to
239697d
Compare
239697d to
71b7049
Compare
71b7049 to
38c0a78
Compare
38c0a78 to
ef7643b
Compare
|
Making test updates |
Also fix spelling
…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.
ef7643b to
c25d1a5
Compare
Beatmap search query string parsing portion of #12148
Removes all usages of
QueryHelper::queryString/simple_query_stringinBeatmapsetSearchwhich 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.tokenisetest