not log in the flarum forum too long !
is the newest updating 16 is support the chinese search ?? ty

  • Chinese search is a limitation of MySQL and the way it works, while we've made improvements to the search system in beta.16 for extension developers that get us closer to search drivers. Search drivers themselves have not been implemented which still results in some issues with UTF-8 (CJK/Other Languages) search.

    We did however make an improvement in beta.15 that makes it possible for extensions to reduce the the minimum number of characters required to start a search.

Chinese search is a limitation of MySQL and the way it works, while we've made improvements to the search system in beta.16 for extension developers that get us closer to search drivers. Search drivers themselves have not been implemented which still results in some issues with UTF-8 (CJK/Other Languages) search.

We did however make an improvement in beta.15 that makes it possible for extensions to reduce the the minimum number of characters required to start a search.

    yiyinyiyang If I remember correctly, @Littlegolden came up with some MySQL config changes that improve chinese search: https://discuss.flarum.org/d/22321-improving-search-for-chinese-characters/15

    If you need to reduce the minimum search length, you can use the following custom JS:

    flarum.core.compat['common/components/Search'].MIN_SEARCH_LEN = NEW_MIN_LENGTH

    I believe you should be able to wrap this in script HTML tags and put it in the custom footer. You might need to run it on document ready though.

      5 months later

      askvortsov Thanks for sharing the custom JS.

      I have add into the following into the footer extension

      $('document').ready(function(){flarum.core.compat['common/components/Search'].MIN_SEARCH_LEN = 2});

      But it doesn't seem to work. Do you mind tell me a little more of how to use the JS?

      I have make changes according to the Littlegolden's post. However, I am not able to make MySQL config changes in my sever due to restriction of the service provider. I presume the JS you provide will be do the job without changing the MySQL config. Is it right?