DevTools:
GET /
DevTools:
GET /_cat/indices?v
DevTools:
POST my-index-000001/_doc
{
"@timestamp": "2022-11-03T08:14:14.485760",
"level": "Information",
"message": "Hello, World from REST API via python!",
"fields": {
"Platform": "Talentech",
"Solution": "Workshop",
"AppName": "Lesson2",
"EnvironmentName": "Local"
}
}
Search for all documents that contain python keyword
DevTools:
GET /my-index-000001/_search?q=python
Search for first two documents that contain field AppName: Lesson2 and show particular values
DevTools:
POST /my-index-000001/_search
{
"query": {
"match" : {
"fields.AppName" : "Lesson2"
}
},
"size": 2,
"from": 0,
"_source": [ "message", "fields.Platform", "fields.Solution" ],
"highlight": {
"fields" : {
"fields.AppName" : {}
}
}
}
You can access _id value that identifies given document and use it to delete some documents:
DevTools:
DELETE /my-index-000001/_doc/<_id>
Reference: ElasticSearch API