# Terminate\_after in es 5

**URL:** <https://discuss.elastic.co/t/terminate-after-in-es-5/99217>\
**Category:** Elasticsearch\
**Created:** [September 3, 2017, 9:13am UTC](https://discuss.elastic.co/t/terminate-after-in-es-5/99217 "2017-09-03T09:13:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![svarup](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@svarup](https://discuss.elastic.co/u/svarup)\
**Post date:** [September 3, 2017, 9:13am UTC](https://discuss.elastic.co/t/terminate-after-in-es-5/99217/1 "2017-09-03T09:13:21Z")

</div>

How to use terminate\_after in count api of es 5 PHP, I can't find any example of terminate\_after

---

<div class="post-metadata">

**Author:** ![jimczi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jimczi/32/47985_2.png) [@jimczi](https://discuss.elastic.co/u/jimczi)\
**Post date:** [September 4, 2017, 9:38am UTC](https://discuss.elastic.co/t/terminate-after-in-es-5/99217/2 "2017-09-04T09:38:20Z")

</div>

It seems that the support for `terminate_after` has been added in [https://github.com/elastic/elasticsearch-php/pull/523](https://github.com/elastic/elasticsearch-php/pull/523)  
I am not familiar with this client but you should be able to use this option in your search in the latest minor version in 5.

---

<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:** [October 2, 2017, 9:38am UTC](https://discuss.elastic.co/t/terminate-after-in-es-5/99217/3 "2017-10-02T09:38:34Z")

</div>

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