标签:直接 指定 format epo cas 脚本语言 country doc ping
RESTful API with JSON over HTTP{
"setting":{
"number_of_shards":5,
"number_of_replicas":1
},
"mappings":{
"man":{
"properties":{
"name":{
"type":"text"
},
"country":{
"type":"keyword"
},
"age":{
"type":"integer"
},
"date":{
"type":"date",
"format":"yyyy-MM-dd HH:mm::ss||yyyy-MM-dd||epoch_millis"
}
}
}
}
}
结构化创建 需要利用mappings 结构化关键词。
{
"cs": {
"properties": {
"title": {
"type": "text"
}
}
}
}
{
"name":"张仁杰",
"country":"China",
"age":30,
"date":"1987-06-01"
}
{
"name":"张惠",
"country":"China",
"age":28,
"date":"1990-11-01"
}
{
"doc":{
"name":"Jack",
"age":31
}
}
{
"script":{
"lang":"painless",
"inline":"ctx._source.age-=10"
}
}
{
"script":{
"lang":"painless",
"inline":"ctx._source.age=params.age",
"params":{
"age":"100"
}
}
}
1.删除文档
DELETE http://127.0.0.1:9200/people
标签:直接 指定 format epo cas 脚本语言 country doc ping
原文地址:http://blog.51cto.com/phpme/2344993