Skip to content
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

Please support Chinese documents in wp-redisearch #12

Open
fuzqing opened this issue Jan 28, 2021 · 3 comments
Open

Please support Chinese documents in wp-redisearch #12

fuzqing opened this issue Jan 28, 2021 · 3 comments

Comments

@fuzqing
Copy link

fuzqing commented Jan 28, 2021

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.

@foadyousefi
Copy link
Member

foadyousefi commented May 3, 2021

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;
});

@fuzqing
Copy link
Author

fuzqing commented May 3, 2021

Ok thanks alot for your help.

@foadyousefi
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants