整体查询条件
{
"size": 0,
"query": {
"bool": {
"must": [
{
"range": {
"attack_time": {
"from": "2023-02-07 15:00:00",
"to": "2023-02-07 16:00:03",
"include_lower": true,
"include_upper": true,
"boost": 1
}
}
},
{
"terms": {
"alarm_project_id": [
1,
5
],
"boost": 1
}
}
],
"adjust_pure_negative": true,
"boost": 1
}
},
"aggregations": {
"agg_composite_project_ip": {
"composite": {

文章详细描述了如何使用Elasticsearch进行复杂查询,包括在特定时间范围内,基于项目ID和IP地址的聚合,同时考虑威胁等级和时间的排序,以及分页处理。提供的Java代码展示了构建查询和聚合的步骤。
最低0.47元/天 解锁文章
1893

被折叠的 条评论
为什么被折叠?



