elastic search 常用查询

时间:2024-01-21 08:09:22

1.查询mapping

curl -X GET "10.0.38.111:1200/metric_data_bus_2018-08-07/_mapping/data_bus?pretty"

2.filter查询

curl -X GET "10.0.38.111:1200/metric_d_2018-08-07/_search?pretty&size=1" -H 'Content-Type: application/json' -d'{
"query": {
"bool": {
"must": { "match_all": {} },
"filter": [{
"range": {
"data.store_latency": {
"gte":
}
}
},{
"range": {
"data.parser_latency": {
"gte":
}
}
}]
}
}
}'