# Minimum\_should\_match and partial word matching 5.x does not work

**URL:** <https://discuss.elastic.co/t/minimum-should-match-and-partial-word-matching-5-x-does-not-work/77970>\
**Category:** Elasticsearch\
**Created:** [March 9, 2017, 11:35am UTC](https://discuss.elastic.co/t/minimum-should-match-and-partial-word-matching-5-x-does-not-work/77970 "2017-03-09T11:35:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![raffis](https://avatars.discourse-cdn.com/v4/letter/r/3be4f8/32.png) [@raffis](https://discuss.elastic.co/u/raffis)\
**Post date:** [March 9, 2017, 11:35am UTC](https://discuss.elastic.co/t/minimum-should-match-and-partial-word-matching-5-x-does-not-work/77970/1 "2017-03-09T11:35:11Z")

</div>

Hows does [https://www.elastic.co/guide/en/elasticsearch/guide/current/ngrams-compound-words.html](https://www.elastic.co/guide/en/elasticsearch/guide/current/ngrams-compound-words.html) work with 5.x?

the ngram filter does actually work, but if I setup a query I want a minimum match of found ngrams otherwise I would get lots of useless documents in the result.

Actually the minimum\_should\_match just gets ignored with 5.2.2, this worked with 2.x very well.

field:  
"name" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
},  
"analyzer" : "trigrams"  
},

Index settings:  
"analysis" : {  
"filter" : {  
"trigrams\_filter" : {  
"type" : "ngram",  
"min\_gram" : "3",  
"max\_gram" : "3"  
}  
},  
"analyzer" : {  
"trigrams" : {  
"filter" : [  
"lowercase",  
"trigrams\_filter"  
],  
"type" : "custom",  
"tokenizer" : "standard"  
}  
}  
},

---

<div class="post-metadata">

**Author:** ![raffis](https://avatars.discourse-cdn.com/v4/letter/r/3be4f8/32.png) [@raffis](https://discuss.elastic.co/u/raffis)\
**Post date:** [March 23, 2017, 9:05pm UTC](https://discuss.elastic.co/t/minimum-should-match-and-partial-word-matching-5-x-does-not-work/77970/2 "2017-03-23T21:05:25Z")

</div>

any ideas?

---

<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:** [April 20, 2017, 9:05pm UTC](https://discuss.elastic.co/t/minimum-should-match-and-partial-word-matching-5-x-does-not-work/77970/3 "2017-04-20T21:05:37Z")

</div>

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