wp-redisearch icon indicating copy to clipboard operation
wp-redisearch copied to clipboard

Please support Chinese documents in wp-redisearch

Open fuzqing opened this issue 4 years ago • 3 comments

Hi,

When I using Chinese in RediSearch with redis-cli, it's working.

image

But I using the same Chinese keywords to search in wp-search, no search results can be obtained.

image

Thanks.

fuzqing avatar Jan 28 '21 20:01 fuzqing

So sorry for the late answer. The language is set to English by default, but I will add support for selecting the language as soon as possible.

In the meanwhile, you can use wp_redisearch_index_language filter. Something like:

add_filter( 'wp_redisearch_index_language', function( $language, $post_id ) {
  if ( $post_id == 123 ) {
    return 'chinese';
  }
  return $language;
});

foadyousefi avatar May 03 '21 16:05 foadyousefi

Ok thanks alot for your help.

fuzqing avatar May 03 '21 19:05 fuzqing

I've added an option to select the default language.

foadyousefi avatar May 03 '21 20:05 foadyousefi