# I think in elasticsearch it shows the size of 10 by default but instead of 10 i want to set the size to total hits value that i am getting after running the query. I am attaching my query Please help me out

**URL:** <https://discuss.elastic.co/t/i-think-in-elasticsearch-it-shows-the-size-of-10-by-default-but-instead-of-10-i-want-to-set-the-size-to-total-hits-value-that-i-am-getting-after-running-the-query-i-am-attaching-my-query-please-help-me-out/282157>\
**Category:** Elasticsearch\
**Created:** [August 22, 2021, 7:44am UTC](https://discuss.elastic.co/t/i-think-in-elasticsearch-it-shows-the-size-of-10-by-default-but-instead-of-10-i-want-to-set-the-size-to-total-hits-value-that-i-am-getting-after-running-the-query-i-am-attaching-my-query-please-help-me-out/282157 "2021-08-22T07:44:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashurajchandra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashurajchandra/32/92908_2.png) [@ashurajchandra](https://discuss.elastic.co/u/ashurajchandra)\
**Post date:** [August 22, 2021, 7:44am UTC](https://discuss.elastic.co/t/i-think-in-elasticsearch-it-shows-the-size-of-10-by-default-but-instead-of-10-i-want-to-set-the-size-to-total-hits-value-that-i-am-getting-after-running-the-query-i-am-attaching-my-query-please-help-me-out/282157/1 "2021-08-22T07:44:40Z")

</div>

```auto
GET /_search
{ 
    "sort": [{ "date": { "order": "desc" } }], 
    "track_total_hits": true,
     "query":
      {
           "bool":
            { 
                "must":
                 [
                     {
                          "bool":
                           {
                                "should":
                                 [
                                     {
                                         "match_phrase": {
                                           "actionType": "Error_Codes"
                                           
                                         }
                                         }
                                         ]
                                          } 
                                          }
                                         
                                               ],
                                                "filter": 
                                                  {
                                                     
                                                       "range": { 
                                                       
                                                         "timestamp_epoch":
                                                         { 
                                                            "gte": "2021-08-21T18:48:25.261Z",
                                                            "lte":"2021-08-21T20:32:25.261Z"
                                                             
                                                           
                                                         }
                                                         
                                                       }
                                                       }  
                                                       } 
                                                       } 
                                                       }

```

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 23, 2021, 1:39am UTC](https://discuss.elastic.co/t/i-think-in-elasticsearch-it-shows-the-size-of-10-by-default-but-instead-of-10-i-want-to-set-the-size-to-total-hits-value-that-i-am-getting-after-running-the-query-i-am-attaching-my-query-please-help-me-out/282157/2 "2021-08-23T01:39:40Z")

</div>

Please don't put your question in the title of your topic, it makes it really hard to follow what you are asking 🙂

The problem here is that you don't know how many hits there are until you run the query. Are you just looking to return _every_ result that it can find?

---

<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:** [September 20, 2021, 1:40am UTC](https://discuss.elastic.co/t/i-think-in-elasticsearch-it-shows-the-size-of-10-by-default-but-instead-of-10-i-want-to-set-the-size-to-total-hits-value-that-i-am-getting-after-running-the-query-i-am-attaching-my-query-please-help-me-out/282157/3 "2021-09-20T01:40:37Z")

</div>

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