GET /
GET /_cat/indices?v
GET /ads_iot_electricity_index/_doc/_mapping
GET /wfs_order_track_index/_doc/_mapping
GET /tms_order_index/_doc/_mapping
GET /_cat/count
#指定index的数据量
GET /_cat/count/wfs_order_list_index
# type 是 _doc,查询type的全部数据
GET /iot_history_data_electricity_index/_doc/_search
GET /ads_iot_electricity_index/_doc/_search
DELETE /ads_iot_electricity_index
GET /tms_order_index/_doc/_search
GET /wfs_order_track_index/_doc/_search
# 查询指定id的document
GET /wfs_order_list_index/_doc/463054288245899264
#日期精确查询
GET /wfs_order_list_index/_doc/_search
{
"query": {
"term": {
"disposeTime": "2020-05-25 15:31:49"
}
}
}
#日期范围查询
GET /wfs_order_list_index/_doc/_search
{
"query": {
"bool": {
"should": {
"range": {
"orderCreateTime": {
"gte": "2020-01-01 00:00:00",
"lte": "2020-01-01 23:59:59"
}
}
}
}
}
}
GET /wfs_order_list_index/_doc/_search
{
"query": {
"bool": {
"should": {
"range": {
"orderUpdateTime": {
"gte": "2020-06-16 00:00:00",
"lte": "2020-06-16 23:59:59"
}
}
}
}
}
}
#日期范围查询
GET /wfs_order_list_index/_doc/_search
{
"query":
{
"bool":
{
"should":
[
{
"range": {
"orderCreateTime":
{
"gte": "2020-06-16 00:00:00",
"lte": "2020-06-16 23:59:59"
}
}
},
{
"range": {
"orderUpdateTime":
{
"gte": "2020-06-16 00:00:00",
"lte": "2020-06-16 23:59:59"
}
}
}
]
}
}
}
GET /wfs_order_list_index/_doc/_search
{
"query": { "match_all": {} }
}
GET /wfs_order_track_index/_doc/_search
{
"query": { "match_all": {} }
}
GET /wfs_order_track_index/_doc/_search
{
"query": {
"bool": {
"filter": {
"range": {
"createTime": {
"gte": "2020-06-18 00:00:00",
"lte": "2020-06-18 23:59:59"
}
}
}
}
}
}
GET /wfs_order_list_index/_doc/_search
{
"query": {
"bool": {
"should": {
"range": {
"orderUpdateTime": {
"gte": "2020-06-16 00:00:00",
"lte": "2020-06-16 23:59:59"
}
}
}
}
}
}
#运送order日期范围查询
GET /tms_order_index/_doc/_search
{
"query":
{
"bool":
{
"should":
[
{
"range": {
"createTime":
{
"gte": "2020-06-20 00:00:00",
"lte": "2020-06-20 23:59:59"
}
}
},
{
"range": {
"updateTime":
{
"gte": "2020-06-20 00:00:00",
"lte": "2020-06-20 23:59:59"
}
}
}
]
}
}
}
过滤,聚合查询
{
"aggs": {
"data": {
"stats": {
"field": "addValue"
}
}
},
"query": {
"bool": {
"must": [
{
"range": {
"acquisitionTime": {
"gt": "2020-08-28 00:00:00",
"lt": "2020-08-28 23:59:59"
}
}
},
{
"term": {
"projectId": "120100LAE"
}
},
{
"term": {
"type": 4
}
}
],
"must_not": [],
"should": []
}
},
"size": 0,
"sort": []
}