Root URI Status

Could someone clarify the difference between the 'status' field on the root
URL vs the 'status' field on /_cluster/health? In this system, the root
URL returns '200' even though the cluster is in 'yellow' as reported by the
cluster health check. What does 200 mean here? What are other possible
values?

~$ curl localhost:9200/_cluster/health?pretty=true
{
"cluster_name" : "elasticsearch",
"status" : "yellow",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 25,
"active_shards" : 25,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 25
}

~$ curl localhost:9200/
{
"status" : 200,
"name" : "elk1",
"cluster_name" : "elasticsearch",
"version" : {
"number" : "1.4.1",
"build_hash" : "89d3241d670db65f994242c8e8383b169779e2d4",
"build_timestamp" : "2014-11-26T15:49:29Z",
"build_snapshot" : false,
"lucene_version" : "4.10.2"
},
"tagline" : "You Know, for Search"
}

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/0e894f4a-faa2-4fe7-8176-a7a1cc846570%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

The value “200” to me is http response code. You can find other value if
your node can’t join the cluster, 503 in such case.

Cheers!

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAP0hgQ1HHMqo1iDOOmNfeTeQAU%2B%3DVtCaiLMuOjUkaY1RzS7X6A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Actually as we are also providing this http response code within http response itself, it does not really make sense to keep it in the JSON response.
It will be removed in elasticsearch 2.0. PR coming here: https://github.com/elasticsearch/elasticsearch/pull/8865 https://github.com/elasticsearch/elasticsearch/pull/8865

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfr https://twitter.com/elasticsearchfr | @scrutmydocs https://twitter.com/scrutmydocs

Le 10 déc. 2014 à 05:00, 熊贻青 xiong.jaguar@gmail.com a écrit :

The value “200” to me is http response code. You can find other value if your node can’t join the cluster, 503 in such case.

Cheers!

--
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/CAP0hgQ1HHMqo1iDOOmNfeTeQAU%2B%3DVtCaiLMuOjUkaY1RzS7X6A%40mail.gmail.com https://groups.google.com/d/msgid/elasticsearch/CAP0hgQ1HHMqo1iDOOmNfeTeQAU%2B%3DVtCaiLMuOjUkaY1RzS7X6A%40mail.gmail.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/C13F97E2-D7C4-4474-8356-2B81387DF54E%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.