首页 > 编程知识 正文

es的查询语句,es分类查询

时间:2023-05-04 01:32:12 阅读:178636 作者:3243

GET /GET /_cat/indices?vGET /ads_iot_electricity_index/_doc/_mappingGET /wfs_order_track_index/_doc/_mappingGET /tms_order_index/_doc/_mappingGET /_cat/count#指定index的数据量GET /_cat/count/wfs_order_list_index# type 是 _doc,查询type的全部数据GET /iot_history_data_electricity_index/_doc/_searchGET /ads_iot_electricity_index/_doc/_searchDELETE /ads_iot_electricity_indexGET /tms_order_index/_doc/_searchGET /wfs_order_track_index/_doc/_search# 查询指定id的documentGET /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": xhdl, "should": xhdl } }, "size": 0, "sort": xhdl}

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。