Reading a document (student data)

With REST client, enter the following:

  • URL: http://localhost:9200/students/student/1
  • Method: GET

With Kibana, enter the following:

GET students/student/1

You will get the following JSON as an output:

{
"_index": "students",
"_type": "student",
"_id": "1",
"_version": 1,
"found": true,
"_source": {
"name": "Nilang",
"standard": 1,
"division": "B",
"gender": "M"
}
}

First, it shows the index and document type. The _id attribute represents the ID that we supplied in the http:/localhost:9200/students/student/1 URL while creating the data. If you use any existing _id, Elasticsearch will simply update that record with current values. The _version attribute represents the number of times the records are updated. The _source attribute represents the data that we supplied.

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

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