# No timeout for CountRequestBuilder?

**URL:** <https://discuss.elastic.co/t/no-timeout-for-countrequestbuilder/4820>\
**Category:** Elasticsearch\
**Created:** [July 8, 2011, 2:04pm UTC](https://discuss.elastic.co/t/no-timeout-for-countrequestbuilder/4820 "2011-07-08T14:04:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)\
**Post date:** [July 8, 2011, 2:04pm UTC](https://discuss.elastic.co/t/no-timeout-for-countrequestbuilder/4820/1 "2011-07-08T14:04:28Z")

</div>

Hi,

is it not possible to set timeout for CountRequestBuilder ?  
May be it does not make sense, just asking.

Regards,  
Lukas

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [July 8, 2011, 8:55pm UTC](https://discuss.elastic.co/t/no-timeout-for-countrequestbuilder/4820/2 "2011-07-08T20:55:08Z")

</div>

No, there isn't an option. Can be added, but you can also just use search\_type set to count, which will have similar behavior (with additional features, like being able to do facets).

On Friday, July 8, 2011 at 5:04 PM, Lukáš Vlček wrote:

> Hi,
> 
> is it not possible to set timeout for CountRequestBuilder ?  
> May be it does not make sense, just asking.
> 
> Regards,  
> Lukas

---

<div class="post-metadata">

**Author:** ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)\
**Post date:** [July 8, 2011, 9:08pm UTC](https://discuss.elastic.co/t/no-timeout-for-countrequestbuilder/4820/3 "2011-07-08T21:08:07Z")

</div>

In my case I need only the count (there are no facets in my query) and I  
assume CountRequestBuilder should be more efficient then  
SearchRequestBuilder with setSearchType(SearchType.COUNT) - is my assumption  
correct?

And I think it would make sense to allow timeout for CountRequestBuilder  
though I can live without it for now (should I open a ticket?).

Regards,  
Lukas

On Fri, Jul 8, 2011 at 10:55 PM, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)wrote:

> No, there isn't an option. Can be added, but you can also just use  
> search\_type set to count, which will have similar behavior (with additional  
> features, like being able to do facets).
> 
> On Friday, July 8, 2011 at 5:04 PM, Lukáš Vlček wrote:
> 
> Hi,
> 
> is it not possible to set timeout for CountRequestBuilder ?  
> May be it does not make sense, just asking.
> 
> Regards,  
> Lukas

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [July 8, 2011, 9:53pm UTC](https://discuss.elastic.co/t/no-timeout-for-countrequestbuilder/4820/4 "2011-07-08T21:53:02Z")

</div>

On Saturday, July 9, 2011 at 12:08 AM, Lukáš Vlček wrote:

> In my case I need only the count (there are no facets in my query) and I assume CountRequestBuilder should be more efficient then SearchRequestBuilder with setSearchType(SearchType.COUNT) - is my assumption correct?

It is a bit more efficient, not by much.

> And I think it would make sense to allow timeout for CountRequestBuilder though I can live without it for now (should I open a ticket?).
> 
> Regards,  
> Lukas
> 
> On Fri, Jul 8, 2011 at 10:55 PM, Shay Banon \<[shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com) ([mailto:shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com))\> wrote:
> 
> > No, there isn't an option. Can be added, but you can also just use search\_type set to count, which will have similar behavior (with additional features, like being able to do facets).
> > 
> > On Friday, July 8, 2011 at 5:04 PM, Lukáš Vlček wrote:
> > 
> > > Hi,
> > > 
> > > is it not possible to set timeout for CountRequestBuilder ?  
> > > May be it does not make sense, just asking.
> > > 
> > > Regards,  
> > > Lukas

---

<div class="post-metadata">

**Author:** ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)\
**Post date:** [July 11, 2011, 8:29am UTC](https://discuss.elastic.co/t/no-timeout-for-countrequestbuilder/4820/5 "2011-07-11T08:29:11Z")

</div>

I just opened a ticket for this:

> <https://github.com/elastic/elasticsearch/issues/1114>
>
> Would it be possible to implement ${subject} before 0.17.0 release?

On Fri, Jul 8, 2011 at 11:53 PM, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)wrote:

> On Saturday, July 9, 2011 at 12:08 AM, Lukáš Vlček wrote:
> 
> In my case I need only the count (there are no facets in my query) and I  
> assume CountRequestBuilder should be more efficient then  
> SearchRequestBuilder with setSearchType(SearchType.COUNT) - is my assumption  
> correct?
> 
> It is a bit more efficient, not by much.
> 
> And I think it would make sense to allow timeout for CountRequestBuilder  
> though I can live without it for now (should I open a ticket?).
> 
> Regards,  
> Lukas
> 
> On Fri, Jul 8, 2011 at 10:55 PM, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)wrote:
> 
> No, there isn't an option. Can be added, but you can also just use  
> search\_type set to count, which will have similar behavior (with additional  
> features, like being able to do facets).
> 
> On Friday, July 8, 2011 at 5:04 PM, Lukáš Vlček wrote:
> 
> Hi,
> 
> is it not possible to set timeout for CountRequestBuilder ?  
> May be it does not make sense, just asking.
> 
> Regards,  
> Lukas

---

<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 6, 2017, 4:01am UTC](https://discuss.elastic.co/t/no-timeout-for-countrequestbuilder/4820/6 "2017-07-06T04:01:02Z")

</div>

Closed on July 6, 2017, 4:01am UTC


