ownertype=2页面都没有这样的参数(本质上是没看懂代码-还需要别人帮你看代码太低级了)

你看看这条数据有哪些特征

通过特征去分析 复现

通过数据找规律呀

你会发现都是 ab栋的数据

谁发现了规律 谁就能快速解决问题

我怎么没发现呢?

第二:本质上是代码没有看懂

平时代码的阅读量太少了

有点绕的代码 就看不明白这怎么能行呢

没有代码量为基础

这就是空中楼阁

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是一个可能的Elasticsearch查询: ``` POST parter_upgrade_scs_saas_main.video_traffic_record/_search { "_source": ["id", "domain_name", "vpn_user", "ip_address", "http_port", "time", "estime"], "query": { "bool": { "must": [ { "exists": { "field": "estime" } } ] } }, "aggs": { "group_by": { "composite": { "size": 1000, "sources": [ { "domain_name": { "terms": { "field": "domain_name" } } }, { "http_port": { "terms": { "field": "http_port" } } }, { "date": { "date_histogram": { "field": "time", "calendar_interval": "day", "format": "yyyy-MM-dd" } } } ] }, "aggs": { "id": { "top_hits": { "size": 1, "_source": ["id"] } }, "vpn_user": { "top_hits": { "size": 1, "_source": ["vpn_user"] } }, "ip_address": { "top_hits": { "size": 1, "_source": ["ip_address"] } }, "happenTime": { "top_hits": { "size": 1, "_source": { "script": { "source": "doc['time'].value.toInstant().atZone(ZoneId.of('Asia/Shanghai')).format(DateTimeFormatter.ofPattern('yyyy-MM-dd HH:mm:ss'))" } } } }, "deviceID": { "terms": { "field": "deviceID" } }, "systemType": { "terms": { "field": "systemType" } }, "devTypeID": { "terms": { "field": "devTypeID" } }, "location": { "top_hits": { "size": 1, "_source": ["location"], "script_fields": { "location": { "script": { "source": "doc['location'].value" } } } } }, "referenceName": { "top_hits": { "size": 1, "_source": { "script": { "source": "doc['location'].value != null ? doc['location'].value : ''" } }, "script_fields": { "referenceName": { "script": { "source": "def location = doc['location'].value != null ? doc['location'].value : ''; def parts = location.split('/'); parts.length > 0 ? parts[0] : ''" } } } } }, "partyUnitName": { "top_hits": { "size": 1, "_source": { "script": { "source": "doc['deviceID'].value != null ? doc['deviceID'].value : ''" } }, "script_fields": { "partyUnitName": { "script": { "source": "def deviceID = doc['deviceID'].value != null ? doc['deviceID'].value : ''; def parts = deviceID.split('_'); parts.length > 0 ? parts[0] : ''" } } } } }, "safetyGearName": { "top_hits": { "size": 1, "_source": { "script": { "source": "doc['deviceID'].value != null ? doc['deviceID'].value : ''" } }, "script_fields": { "safetyGearName": { "script": { "source": "def deviceID = doc['deviceID'].value != null ? doc['deviceID'].value : ''; def parts = deviceID.split('_'); parts.length > 1 ? parts[1] : ''" } } } } } } } } } ``` 这个查询会按照`domain_name`,`http_port`和日期分组,同时在每个组内找到满足`estime`字段存在的文档,并从中提取所需的字段。其中,`happenTime`字段使用脚本来将UNIX时间戳转换为本地时间,`location`字段使用脚本来提取其中的第一部分作为`referenceName`,`deviceID`字段使用脚本来提取其中的第一部分作为`partyUnitName`,提取第二部分作为`safetyGearName`。 请注意,这个查询可能需要根据您的数据模型和查询需求进行适当的调整。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值