Formatting the JSON response

By default, the response of all the requests is not formatted. It returns an unformatted JSON string in a single line:

curl -XGET http://localhost:9200/catalog/_doc/1

The following response is not formatted:

{"_index":"catalog","_type":"product","_id":"1","_version":3,"found":true,"_source":{
"sku": "SP000001",
"title": "Elasticsearch for Hadoop",
"description": "Elasticsearch for Hadoop",
"author": "Vishal Shukla",
"ISBN": "1785288997",
"price": 26.99
}}

Passing pretty=true formats the response:

curl -XGET http://localhost:9200/catalog/_doc/1?pretty=true
{
"_index" : "catalog",
"_type" : "product",
"_id" : "1",
"_version" : 3,
"found" : true,
"_source" : {
"sku" : "SP000001",
"title" : "Elasticsearch for Hadoop",
"description" : "Elasticsearch for Hadoop",
"author" : "Vishal Shukla",
"ISBN" : "1785288997",
"price" : 26.99
}
}

When you are using the Kibana Console UI, all responses are formatted by default. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.241.51