Chinese, Japanese and Korean (CJK) languages

Manticore has built-in support for indexing CJK texts. There are two ways how CJK text can be processed:

SQL:
CREATE TABLE products(title text, price float) charset_table = 'cjk' morphology = 'icu_chinese'
POST /cli -d "
CREATE TABLE products(title text, price float) charset_table = 'cjk' morphology = 'icu_chinese'"
$index = new \Manticoresearch\Index($client);
$index->setName('products');
$index->create([
            'title'=>['type'=>'text'],
            'price'=>['type'=>'float']
        ],[
            'charset_table' => 'cjk',
            'morphology' => 'icu_chinese'
        ]);
Python:
utilsApi.sql('mode=raw&query=CREATE TABLE products(title text, price float) charset_table = \'cjk\' morphology = \'icu_chinese\'')
Javascript:
res = await utilsApi.sql('mode=raw&query=CREATE TABLE products(title text, price float) charset_table = \'cjk\' morphology = \'icu_chinese\'');
Java:
utilsApi.sql("mode=raw&query=CREATE TABLE products(title text, price float) charset_table = 'cjk' morphology = 'icu_chinese'");
index products {
  charset_table = cjk
  morphology = icu_chinese
  
  type = rt
  path = idx
  rt_field = title
  rt_attr_uint = price
}
SQL:
CREATE TABLE products(title text, price float) charset_table = 'non_cjk' ngram_len = '1' ngram_chars = 'cjk'
POST /cli -d "
CREATE TABLE products(title text, price float) charset_table = 'non_cjk' ngram_len = '1' ngram_chars = 'cjk'"
$index = new \Manticoresearch\Index($client);
$index->setName('products');
$index->create([
            'title'=>['type'=>'text'],
            'price'=>['type'=>'float']
        ],[
             'charset_table' => 'non_cjk',
             'ngram_len' => '1',
             'ngram_chars' => 'cjk'
        ]);
Python:
utilsApi.sql('mode=raw&query=CREATE TABLE products(title text, price float) charset_table = \'non_cjk\' ngram_len = \'1\' ngram_chars = \'cjk\'')
javascript:
res = await utilsApi.sql('mode=raw&query=CREATE TABLE products(title text, price float) charset_table = \'non_cjk\' ngram_len = \'1\' ngram_chars = \'cjk\'');
java:
utilsApi.sql("mode=raw&query=CREATE TABLE products(title text, price float) charset_table = 'non_cjk' ngram_len = '1' ngram_chars = 'cjk'");
index products {
  charset_table = non_cjk
  ngram_len = 1
  ngram_chars = cjk

  type = rt
  path = idx
  rt_field = title
  rt_attr_uint = price
}

There’s also built-in stopwords for Chinese with alias zh.

SQL:
CREATE TABLE products(title text, price float) charset_table = 'chinese' morphology = 'icu_chinese' stopwords = 'zh'
POST /cli -d "
CREATE TABLE products(title text, price float) charset_table = 'chinese' morphology = 'icu_chinese' stopwords = 'zh'"
PHP:
$index = new \Manticoresearch\Index($client);
$index->setName('products');
$index->create([
            'title'=>['type'=>'text'],
            'price'=>['type'=>'float']
        ],[
            'charset_table' => 'chinese',
            'morphology' => 'icu_chinese',
            'stopwords' => 'zh'
        ]);
Python:
utilsApi.sql('mode=raw&query=CREATE TABLE products(title text, price float) charset_table = \'chinese\' morphology = \'icu_chinese\' stopwords = \'zh\'')
javascript:
res = await utilsApi.sql('mode=raw&query=CREATE TABLE products(title text, price float) charset_table = \'chinese\' morphology = \'icu_chinese\' stopwords = \'zh\'');
java:
utilsApi.sql("mode=raw&query=CREATE TABLE products(title text, price float) charset_table = 'chinese' morphology = 'icu_chinese' stopwords = 'zh'");
index products {
  charset_table = chinese
  morphology = icu_chinese
  stopwords = zh
  
  type = rt
  path = idx
  rt_field = title
  rt_attr_uint = price
}