# ES returns ok:true if status is 503

**URL:** <https://discuss.elastic.co/t/es-returns-ok-true-if-status-is-503/15193>\
**Category:** Elasticsearch\
**Created:** [January 10, 2014, 8:51am UTC](https://discuss.elastic.co/t/es-returns-ok-true-if-status-is-503/15193 "2014-01-10T08:51:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![J\_Schulz](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@J\_Schulz](https://discuss.elastic.co/u/J_Schulz)\
**Post date:** [January 10, 2014, 8:51am UTC](https://discuss.elastic.co/t/es-returns-ok-true-if-status-is-503/15193/1 "2014-01-10T08:51:16Z")

</div>

Hi,

why does ES returns ok:true if the status code is 503? I would expect  
ok:false.

{  
"ok" : true,  
"status" : 503,  
"name" : "proxy01",  
"version" : {  
"number" : "0.90.7",  
"build\_hash" : "36897d07dadcb70886db7f149e645ed3d44eb5f2",  
"build\_timestamp" : "2013-11-13T12:06:54Z",  
"build\_snapshot" : false,  
"lucene\_version" : "4.5.1"  
},  
"tagline" : "You Know, for Search"  
}

Cheers  
Jonny

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/4aa02d00-2d1e-4aeb-869d-ab9ad0114fe6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4aa02d00-2d1e-4aeb-869d-ab9ad0114fe6%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [January 10, 2014, 9:21am UTC](https://discuss.elastic.co/t/es-returns-ok-true-if-status-is-503/15193/2 "2014-01-10T09:21:01Z")

</div>

It's misleading, the ok:true is not related in any way to REST status. This  
confusion will be removed in later versions, there are no more ok:true's  
scattered over some responses . It was also inconsistent, not all responses  
included an ok:true.

Jörg

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGmK9560K8AAY4XO5GCUE2RHspR4P%3DsaEpJRXNweu2G5Q%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGmK9560K8AAY4XO5GCUE2RHspR4P%3DsaEpJRXNweu2G5Q%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 10, 2014, 9:21am UTC](https://discuss.elastic.co/t/es-returns-ok-true-if-status-is-503/15193/3 "2014-01-10T09:21:40Z")

</div>

"ok": true will be removed in next versions (1.0).

See [https://github.com/elasticsearch/elasticsearch/issues/4310](https://github.com/elasticsearch/elasticsearch/issues/4310)

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 10 janvier 2014 at 09:51:21, J. Schulz ([js.bloonix@gmail.com](mailto:js.bloonix@gmail.com)) a écrit:

Hi,

why does ES returns ok:true if the status code is 503? I would expect ok:false.

{  
"ok" : true,  
"status" : 503,  
"name" : "proxy01",  
"version" : {  
"number" : "0.90.7",  
"build\_hash" : "36897d07dadcb70886db7f149e645ed3d44eb5f2",  
"build\_timestamp" : "2013-11-13T12:06:54Z",  
"build\_snapshot" : false,  
"lucene\_version" : "4.5.1"  
},  
"tagline" : "You Know, for Search"  
}

## Cheers Jonny

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/4aa02d00-2d1e-4aeb-869d-ab9ad0114fe6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4aa02d00-2d1e-4aeb-869d-ab9ad0114fe6%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.52cfbba4.6b68079a.16eca%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.52cfbba4.6b68079a.16eca%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![J\_Schulz](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@J\_Schulz](https://discuss.elastic.co/u/J_Schulz)\
**Post date:** [January 10, 2014, 9:24am UTC](https://discuss.elastic.co/t/es-returns-ok-true-if-status-is-503/15193/4 "2014-01-10T09:24:34Z")

</div>

Great. Thank you both for the quick response.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/3d0be2ac-4033-4869-93b9-3121f58be405%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3d0be2ac-4033-4869-93b9-3121f58be405%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 1:57am UTC](https://discuss.elastic.co/t/es-returns-ok-true-if-status-is-503/15193/5 "2017-07-06T01:57:27Z")

</div>


