Get API

The get API is useful for retrieving a document when you already know the ID of the document. It is essentially a get by primary key operation, as follows:

GET /catalog/_doc/1ZFMpmoBa_wgE5i2FfWV

The format of this request is GET /<index>/<type>/<id>. The response would be as expected:

{
"_index" : "catalog",
"_type" : "_doc",
"_id" : "1ZFMpmoBa_wgE5i2FfWV",
"_version" : 1,
"_seq_no" : 4,
"_primary_term" : 1,
"found" : true,
"_source" : {
"sku" : "SP000003",
"title" : "Mastering Elasticsearch",
"description" : "Mastering Elasticsearch",
"author": "Bharvi Dixit",
"price": 54.99
}
}
..................Content has been hidden....................

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