# Get response very slowly when using ngram

**URL:** <https://discuss.elastic.co/t/get-response-very-slowly-when-using-ngram/88492>\
**Category:** Elasticsearch\
**Created:** [June 7, 2017, 2:10am UTC](https://discuss.elastic.co/t/get-response-very-slowly-when-using-ngram/88492 "2017-06-07T02:10:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![linda](https://avatars.discourse-cdn.com/v4/letter/l/67e7ee/32.png) [@linda](https://discuss.elastic.co/u/linda)\
**Post date:** [June 7, 2017, 2:10am UTC](https://discuss.elastic.co/t/get-response-very-slowly-when-using-ngram/88492/1 "2017-06-07T02:10:48Z")

</div>

we using ngram for partial match, and set value 1,1 for min\_gram, max\_gram. But get response very slowly when using query phrase as follows:  
POST trimps2/tb/\_search  
{  
"query": {  
"multi\_match": {  
"query": "138141",  
"type": "phrase",  
"slop": 0,  
"fields": ["\_all"],  
"analyzer": "charSplit",  
"max\_expansions": 1  
}  
},  
"profile": true,  
"from": 100  
}  
charSplit is self-defined analyzer.  
Total data size is about 165G, and number of docs is about 501,667,114.  
Any idea to model data with other way which can get response quickly. Thank you very much.

---

<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:** [July 5, 2017, 2:10am UTC](https://discuss.elastic.co/t/get-response-very-slowly-when-using-ngram/88492/2 "2017-07-05T02:10:55Z")

</div>

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