PuppyIP Resource Center
AI Tool Updates 5 min Published 2026-10-17

Cloudflare AI Search for Chinese Keywords: When to Use the trigram Tokenizer

Cloudflare now recommends trigram tokenization for Japanese, Chinese, and Korean content. If Chinese keyword searches in AI Search often return nothing, first confirm that your retrieval flow uses keyword search; changing the tokenizer triggers a full reindex.

Cloudflare AI Search Chinese search keyword search trigram

Service eligibility and regional restrictions

PuppyIP serves only compliant overseas businesses and their authorized personnel. Proxy services are not available in mainland China. The service may only be used for lawful business activities outside mainland China. Use of this service within mainland China is prohibited.

Hosting a proxy IP or server overseas does not change these restrictions. The service must not be provided to end users in mainland China through relaying, forwarding, sharing or resale. Before use, read the Terms of Service.

Key Takeaways

  • Cloudflare’s October 16 update says trigram keyword search now matches Japanese, Chinese, and Korean queries, including natural-language questions.
  • The setting is indexing_options.keyword_tokenizer. It defaults to porter; Cloudflare recommends trigram for CJK content.
  • Trigram creates overlapping three-character windows. Words shorter than three characters cannot match on their own.
  • Changing the tokenizer triggers a full reindex. The official pages give no fixed duration or separate price for that reindex.

What changed on October 16?

In its changelog entry, Cloudflare says AI Search keyword search with the trigram tokenizer now supports Japanese, Chinese, and Korean queries, including full natural-language questions. The note says no-space queries were previously treated as one exact phrase and usually returned no keyword results; the porter tokenizer also works poorly for these languages.

This is a keyword-search update, not a universal fix for every AI Search question. Cloudflare does not promise that every Chinese query will match, or say this changes vector retrieval or answer-generation quality.

First check whether the issue is keyword retrieval

The keyword-search documentation distinguishes keyword and vector retrieval: an instance can use keyword search, vector search, or combine them. The tokenizer controls how text is split for the keyword component, so changing it does not change a vector-only flow.

With hybrid retrieval, trigram affects the keyword part; it does not replace an embedding model or remove the need to check indexing status, source files, and the query itself. Confirm that the current request includes keyword retrieval before changing the tokenizer.

Which setting should you change for Chinese content?

Cloudflare places the tokenizer at indexing_options.keyword_tokenizer. Its default, porter, is suited to natural language split by spaces; the documentation recommends trigram for Japanese, Chinese, or Korean content.

Trigram splits text into overlapping three-character windows. For illustration only, the Chinese phrase “账单到期日” produces windows such as “账单到,” “单到期,” and “到期日.” This explains the tokenization method; it is not a retrieval test.

The documentation also says words shorter than three characters cannot match on their own. Do not expect a two-character abbreviation or term to be found by itself; use a longer query with context and test it against your own content.

Plan for a full reindex before switching

Changing keyword_tokenizer triggers a full reindex. For an existing large knowledge base, confirm that the reindex window is acceptable and watch the instance’s indexing status; do not treat this field change as an immediate, wait-free toggle.

The two current Cloudflare pages do not list a fixed duration or separate charge for this reindex, and they cannot estimate it for your data volume. Prepare acceptance queries from representative Chinese questions, then schedule the change against current documentation and your account’s actual conditions. This article did not operate an account or run searches.

Trigram and AND/OR are separate choices

Tokenization controls how text is split. keyword_match_mode controls whether multiple query terms must all match (and, the default) or whether any term can match (or). The latter broadens matching and may also return more irrelevant results.

For missing Chinese keyword matches, first check the retrieval path and tokenizer. Only if tokenization is suitable but the query conditions remain too strict should you separately assess and versus or; they are not one combined “Chinese switch.”

Sources

Frequently Asked Questions

Will switching to trigram guarantee Chinese queries return results?

No. Cloudflare says trigram can match CJK keyword queries, but actual results still depend on the indexed content and query. Check hits, misses, and irrelevant results with representative questions.

Does this setting change vector search?

The documentation places keyword_tokenizer in the keyword-indexing settings. It affects the keyword component; the vector component of hybrid retrieval remains governed by vector-search configuration.

Can a two-character term match by itself with trigram?

Cloudflare says words shorter than three characters cannot match on their own. Add longer context to the query and verify it against your content.

What happens after changing the tokenizer?

Cloudflare documents that the change triggers a full reindex. Plan an acceptable reindex window, then retest keyword queries after indexing completes.

Should I also change keyword_match_mode to or?

Not necessarily. It is separate from tokenization: and requires all query terms to match, while or permits any term to match. Consider or only when broader results are useful, and check for added irrelevant matches.