# Total number of hits is less than expected

**URL:** <https://discuss.elastic.co/t/total-number-of-hits-is-less-than-expected/62310>\
**Category:** Elasticsearch\
**Created:** [October 5, 2016, 7:54pm UTC](https://discuss.elastic.co/t/total-number-of-hits-is-less-than-expected/62310 "2016-10-05T19:54:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pavlo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pavlo/32/12176_2.png) [@Pavlo](https://discuss.elastic.co/u/Pavlo)\
**Post date:** [October 5, 2016, 7:54pm UTC](https://discuss.elastic.co/t/total-number-of-hits-is-less-than-expected/62310/1 "2016-10-05T19:54:19Z")

</div>

Hello. I am using autogenerated index for documents with string field. When I try to search the prefix of the word, I do not receive expected document in the result and overall number of hits is less than expected.

"match":{  
"displayAs":{  
"type":"phrase\_prefix",  
"query":"ot\_",  
"zero\_terms\_query":"all"  
}  
}

When I try to enter more information in query string, I managed to receive expected document. Why does this happen? Is it possible to configure it to receive all matched documents?

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [October 5, 2016, 8:08pm UTC](https://discuss.elastic.co/t/total-number-of-hits-is-less-than-expected/62310/2 "2016-10-05T20:08:27Z")

</div>

Have a look at the [`max_expansions`](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-query.html#query-dsl-match-query-phrase-prefix) parameter.

---

<div class="post-metadata">

**Author:** ![Pavlo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pavlo/32/12176_2.png) [@Pavlo](https://discuss.elastic.co/u/Pavlo)\
**Post date:** [October 6, 2016, 7:28am UTC](https://discuss.elastic.co/t/total-number-of-hits-is-less-than-expected/62310/3 "2016-10-06T07:28:39Z")

</div>

Thank you. This is really the cause

---

<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, 10:14pm UTC](https://discuss.elastic.co/t/total-number-of-hits-is-less-than-expected/62310/4 "2017-07-05T22:14:25Z")

</div>


