Elasticsearch Curl Commands Retrieve a document by Id


Example

curl -XGET 'http://www.example.com:9200/myIndexName/myTypeName/1'

Output:

{
    "_index" : "myIndexName",
    "_type" : "myTypeName",
    "_id" : "1",
    "_version" : 1,
    "found": true,
    "_source" : {
        "user" : "mrunal",
        "postDate" : "2016-07-25T15:48:12",
        "message" : "This is test document!"
    }
}

Reference Link: Here