# On the use of es to achieve fuzzy matching problem?

**URL:** <https://discuss.elastic.co/t/on-the-use-of-es-to-achieve-fuzzy-matching-problem/94558>\
**Category:** Elasticsearch\
**Created:** [July 26, 2017, 2:06am UTC](https://discuss.elastic.co/t/on-the-use-of-es-to-achieve-fuzzy-matching-problem/94558 "2017-07-26T02:06:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hubiao](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hubiao/32/26178_2.png) [@hubiao](https://discuss.elastic.co/u/hubiao)\
**Post date:** [July 26, 2017, 2:06am UTC](https://discuss.elastic.co/t/on-the-use-of-es-to-achieve-fuzzy-matching-problem/94558/1 "2017-07-26T02:06:13Z")

</div>

I have a text that will contain Chinese or letters and numbers. Es how to retrieve the fastest way?

Examples are as follows

现在，“讲情不讲法”在农村吃不开、行不通了。群众自觉守法、遇事找法、解决问题靠法的意识不断增强，基层干部运用法治思维、法治方式解决问题的能力明显提升，农村法治建设步履坚实，正成为农业农村持续健康发展的强大支撑和坚固保障

I hope not to divide words so that I can use any form of matching

If I retrieve the text that is becoming a farm, I can also retrieve it.

If you use type: keywrod, then use wildcards or regular \* is becoming a farmer \* so the query is very slow.

So I now want to use ngram, he can help me to n \* size characters all indexed, so I can achieve a fuzzy match  
"Tokenizer": {  
"Ngram\_tokenizer": {  
"Type": "ngram",  
"Min\_gram": 1,  
"Max\_gram": 6000  
}

But the use of ngram in the establishment of the index when this happens, please click on the link to see my details of the error message  
[错误详情](Https://github.com/elastic/elasticsearch/issues/25841)

---

<div class="post-metadata">

**Author:** ![hubiao](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hubiao/32/26178_2.png) [@hubiao](https://discuss.elastic.co/u/hubiao)\
**Post date:** [July 28, 2017, 1:58am UTC](https://discuss.elastic.co/t/on-the-use-of-es-to-achieve-fuzzy-matching-problem/94558/2 "2017-07-28T01:58:00Z")

</div>

Help me go up

---

<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:** [August 25, 2017, 1:58am UTC](https://discuss.elastic.co/t/on-the-use-of-es-to-achieve-fuzzy-matching-problem/94558/3 "2017-08-25T01:58:02Z")

</div>

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