# A bout early termination of search request -- track\_total\_hits

**URL:** <https://discuss.elastic.co/t/a-bout-early-termination-of-search-request-track-total-hits/111982>\
**Category:** Elasticsearch\
**Created:** [December 15, 2017, 12:35pm UTC](https://discuss.elastic.co/t/a-bout-early-termination-of-search-request-track-total-hits/111982 "2017-12-15T12:35:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sshling](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sshling/32/24052_2.png) [@sshling](https://discuss.elastic.co/u/sshling)\
**Post date:** [December 15, 2017, 12:35pm UTC](https://discuss.elastic.co/t/a-bout-early-termination-of-search-request-track-total-hits/111982/1 "2017-12-15T12:35:23Z")

</div>

ref :[A bout early termination of search request](https://www.elastic.co/guide/en/elasticsearch/reference/master/index-modules-index-sorting.html#early-terminate)

```
GET /events/_search
{
    "size": 10,
    "sort": [ 
        { "timestamp": "desc" }
    ],
    "track_total_hits": false
}

```

If the search query to join other query conditions,  
whether it will match the query regardless of the value of `track_total_hits` ? such as :

```
GET test4/_search
{
  "size": 100,
  "query": {
    "wildcard" : { "desc" : "x*G" }
  },
  "sort": [
    {
      "testDate": "desc"
    }
  ],
  "track_total_hits": true
}

```

The result looks like it does not matter if this parameter(`track_total_hits`) is configured

---

<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:** [January 12, 2018, 12:35pm UTC](https://discuss.elastic.co/t/a-bout-early-termination-of-search-request-track-total-hits/111982/2 "2018-01-12T12:35:34Z")

</div>

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