Vote #76728
完了Fix tokenization of phrases with non-ascii chars
0%
説明
\w only matches ASCII characters, we should either use @[:alnum:]@ instead or simply match all non-@"@ characters for the phrase. Test case included.
journals
+1
Search keyword '"日本語 テスト"' (written in Japanese) matches both "日本語 テスト" and "日本語テスト" in the current trunk, but it should not match the latter.
*expected:*
<pre>
Redmine::Search::Fetcher.new('"日本語 テスト"', ...).tokens => ['日本語 テスト']
</pre>
*actual:*
<pre>
Redmine::Search::Fetcher.new('"日本語 テスト"', ...).tokens => ['日本語', 'テスト']
</pre>
This behavior can be fixed by this patch.
--------------------------------------------------------------------------------
Patch applied, thanks.
--------------------------------------------------------------------------------