# About how to use term\\phrase suggest

**URL:** <https://discuss.elastic.co/t/about-how-to-use-term-phrase-suggest/129399>\
**Category:** Elasticsearch\
**Created:** [April 25, 2018, 3:46am UTC](https://discuss.elastic.co/t/about-how-to-use-term-phrase-suggest/129399 "2018-04-25T03:46:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jayezhuang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jayezhuang/32/30568_2.png) [@Jayezhuang](https://discuss.elastic.co/u/Jayezhuang)\
**Post date:** [April 25, 2018, 3:46am UTC](https://discuss.elastic.co/t/about-how-to-use-term-phrase-suggest/129399/1 "2018-04-25T03:46:01Z")

</div>

The following is the request body I sent:

"suggest":{  
"text":"运动写", //Chinese  
"simple\_term":{  
"term":{  
"analyzer":"simple\_pinyin\_analyzer", //use whitespace tokenizer and pinyin filter  
"field":"keywords.pinyin", //use ik\_smart tokenizer and pinyin filter  
"suggest\_mode":"ALWAYS",  
"accuracy":0.5,  
"sort":"SCORE",  
"string\_distance":"INTERNAL",  
"max\_edits":2,  
"max\_inspections":5,  
"max\_term\_freq":0.01,  
"prefix\_length":1,  
"min\_word\_length":2,  
"min\_doc\_freq":0  
}  
}

The results:  
"simple\_term": [  
{  
"text": "运动写",  
"offset": 0,  
"length": 3,  
"options": [  
{  
"text": "运动鞋",  
"score": 0.6666666,  
"freq": 1  
}  
]  
},  
{  
"text": "yundongxie",  
"offset": 0,  
"length": 3,  
"options": []  
},  
{  
"text": "ydx",  
"offset": 0,  
"length": 3,  
"options": []  
}  
]  
At the same time split into Chinese and Pinyin, respectively, for error correction, Chinese can get error correction results (some error correction results are not ideal), for Pinyin error correction, due to correct spelling, so no results. The purpose that I want to achieve is to match Chinese according to pinyin and return the corresponding Chinese result;  
Is there any problem with my thinking, or is it possible to solve the pinyin error correction and get Chinese results?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 23, 2018, 3:50am UTC](https://discuss.elastic.co/t/about-how-to-use-term-phrase-suggest/129399/2 "2018-05-23T03:50:43Z")

</div>

Closed on May 23, 2018, 3:50am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
