All Products
Search
Document Center

:Pinyin spelling analyzers

Last Updated:Aug 27, 2024

Full pinyin spelling analyzer

Overview

The full pinyin spelling analyzer (full_pinyin) allows you to search for Chinese characters in short text by using full pinyin spellings or the first letter or the first couple of letters in abbreviated pinyin spellings. This analyzer is suitable for searches based on the full pinyin spelling or abbreviated pinyin spelling, such as searches for movie names or author names. To search for characters based on the full pinyin spelling, a user must enter the full pinyin spelling of the characters, not part of the full pinyin spelling.

To use the full pinyin spelling analyzer, set the analyzer to full_pinyin when you configure a schema. When you perform a query, set the analyzer for the corresponding index to pinyin_search_analyzer in the analyzer clause.

Example: If the value of a field is "大内密探007" in a document and the full pinyin spelling analyzer is specified, the document can be retrieved when a user searches for "d", "dn", "dnm", "dnmt", "dnmt007", "da", "danei", "daneimi", or "daneimitan". The document cannot be retrieved when a user searches for "an" or "anei".

Abbreviated pinyin spelling analyzer

Overview

The abbreviated pinyin spelling analyzer (first_letter) allows you to search for Chinese characters in short text by using the first or first couple of letters in abbreviated pinyin spellings. This analyzer is suitable for searches based on abbreviated pinyin spellings, such as searches for movie names or author names.

To use the abbreviated pinyin spelling analyzer, set the analyzer to first_letter when you configure a schema. When you perform a query, set the analyzer for the corresponding index to pinyin_search_analyzer in the analyzer clause.

If the value of a field is "大内密探007" in a document and the abbreviated pinyin spelling analyzer is specified, the document can be retrieved when a user searches for "d", "dn", "dnm", "dnmt", "dnmt0", "damt007", "m", "mt", "mt007", or "007".