常用操作

查询所有数据

POST http://192.168.97.173:27009/logstash_test_2018/doc/_search 

{
"query": {
"bool": {
"must": [
{
"match_all": { }
}
],
"must_not": [ ],
"should": [ ]
}
},
"from": 0,
"size": 20,
"sort": [ ],
"aggs": { }
}

 

根据条件查询

POST http://192.168.97.173:27009/logstash_tower-lihang_2018/doc/_search

{
"query": {
"bool": {
"must": [
{
"wildcard": {
"weight.keyword": "互*网"
}
}
],
"must_not": [ ],
"should": [ ]
}
},
"from": 0,
"size": 10,
"sort": [ ],
"aggs": { }
}

 

更新数据

PUT http://192.168.97.173:27009/logstash_tower-lihang_2018/doc/cqXKaWQBCaAmlugIjMEd(这是ID)

{
"windSpeed": "0"
}

 

根据id删除数据

POST http://192.168.97.173:27009/logstash_tower-lihang_2018/doc/_delete_by_query

{
"query": { 
"match": {
"_id": "VqZhd2QBCaAmlugIeMZQ"
}
}
}

 

根据某字段排序

POST http://192.168.97.173:27009/logstash_tower-lihang_2018/doc/_search

{
"query": {
"bool": {
"must": [
{
"wildcard": {
"weight.keyword": "互*网"
}
}
],
"must_not": [ ],
"should": [ ]
}
},
"from": 0,
"size": 10,

 "sort": {"dateTime":{"order": "desc"}}, 

"aggs": { }
}

 

相关文章:

  • 2021-07-29
  • 2021-07-23
  • 2021-08-15
  • 2022-12-23
  • 2021-12-23
  • 2021-12-23
  • 2022-12-23
  • 2022-01-25
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-02
  • 2022-01-10
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案