url
来源:互联网 发布:mac虚拟机共享 编辑:程序博客网 时间:2024/06/05 03:04
127.0.0.1:9200/peoples
{
"mappings":{
"properties":{
"man":{
"name":{"type":"text"},
"age":{"type":"integer"}
}
}
}
}
127.0.0.1:9200/peoples/man/1
{
"name":"ere",
"age":123,
"country":"china",
"date":"1999-09-09"
}
127.0.0.1:9200/peoples/man/1/_update更改
{
"script"{//配置语言,支持多种语言脚本
"lang":"painless",
"inline":"ctx._source.age+=1"
}
}
{
"script"{//配置语言,支持多种语言脚本
"lang":"painless",
"inline":"ctx._source.age=params.age",
"params":{
"age":100
}
}
}
127.0.0.1:9200/peoples/_search搜索
{
"query":{
"match_all":{}
},
"from":1,
"size":10
}
{
"query":{
"match":{
"title":"xxxxx"
}
},
}
聚合查询
{
"aggs":{
"g":{
"terms":{
"fields":"word_count"
}
},
"g2":{
"terms":{
"fields":"date"
}
},
"g3":{
"stats":{//函数/"min/max"等
"field":"word_count"
}
}
}
}
阅读全文
0 0