Han Yi
March 27, 2018
ElasticSearch
Elastic Search
Elastic search
...
Index
Type
Document
Field
Row
Database
Table
Column
Index
Type
Document
Field
Row
Database
Table
Column
PUT prdts/_doc/1
{
"title": "coat",
"price": "15"
}
{
"_index": "prdts",
"_type": "_doc",
"_id": "1",
"_version": 1,
"result": "created",
"_shards": {
"total": 2,
"successful": 1,
"failed": 0
},
"_seq_no": 0,
"_primary_term": 1
}
GET prdts/_doc/1
{
"_index": "prdts",
"_type": "_doc",
"_id": "1",
"_version": 1,
"found": true,
"_source": {
"title": "coat",
"price": "15"
}
}
POST prdts/_doc/1/_update
{
"doc": {
"price": "20"
}
}
{
"_index": "prdts",
"_type": "_doc",
"_id": "1",
"_version": 2,
"result": "updated",
"_shards": {
"total": 2,
"successful": 1,
"failed": 0
},
"_seq_no": 1,
"_primary_term": 1
}
DELETE prdts/_doc/1
{
"_index": "prdts",
"_type": "_doc",
"_id": "1",
"_version": 3,
"result": "deleted",
"_shards": {
"total": 2,
"successful": 1,
"failed": 0
},
"_seq_no": 2,
"_primary_term": 1
}