你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
输入关键字进行搜索
搜索:
没有找到相关结果
trycatchfinal
赞同来自: TinaZhou
ziyou - 一个学习ELK的Java程序员
{ "query": { "bool": { "filter": { "script": { "script": "doc['materials'].values.length > 3" } } } }, "size": 100 }
{ "query": { "bool": { "filter": { "script": { "script": "doc['materials.id.keyword'].values.length > 1" } } } }, "size": 100 }
TinaZhou
赞同来自:
shwtz - 学物理想做演员的IT男
要回复问题请先登录或注册
6 个回复
trycatchfinal
赞同来自: TinaZhou
ziyou - 一个学习ELK的Java程序员
赞同来自: TinaZhou
ziyou - 一个学习ELK的Java程序员
赞同来自: TinaZhou
基于你存储的是object的格式,你可以使用一个确保每个material里都有的字段,例如id,然后使用以下查询语句即可实现查询:
这个是我亲测的,是可以实现你的需求的,望采纳。
TinaZhou
赞同来自:
"_type": "advertisement",
"_id": "3914898cba827c9e914b45388a71e235104686001",
"_version": 1,
"_score": 1,
"_source": {
"adFormallyType": null,
"adFormallyTypes": null,
"adFoundCount": 2,
"adFoundDays": 1,
"adTimeEnd": 1537435234356,
"adTimeStart": 1537434168000,
"add": false,
"appId": null,
"appName": null,
"bizer": "e中信",
"createTime": 1537435163958,
"days": [
1537435234356
],
"description": null,
"exposureUrl": null,
"fluxId": "2000",
"fluxIds": [
"2000"
,
"2001"
],
"fluxName": "今日头条",
"hideApp": null,
"iconId": null,
"iconUrl": null,
"id": "3914898cba827c9e914b45388a71e235104686001",
"industry": null,
"key": "104686001",
"locationUrl": "https://creditcard.ecitic.com/ ... ot%3B,
"locationUrlEncrypted": "129ee4b03c4bed5343a5bcb0be42cf29",
"materialCount": 1,
"materials": [
{
"coverId": null,
"coverUrl": null,
"createTime": null,
"exposureUrl": null,
"groupId": null,
"height": "1786",
"id": "205604837",
"link": "https://image-c-dev.weimobwmc. ... ot%3B,
"linkOriginal": "https://file.adbug.cn/m/image/ ... ot%3B,
"linkOriginalEncrypted": null,
"materialType": 11,
"mediaId": "205604837",
"ocrTxt": null,
"size": "298061",
"updateTime": null,
"width": "1242"
}
],
"promoteType": null,
"realFluxName": "今日头条",
"sourcePlatform": 6,
"sourcePlatformName": "www.adbug.cn",
"sourcePlatformNameStatic": "www.adbug.cn",
"title": "出差还能这么轻松?",
"updateTime": 1537435234356
}}
TinaZhou
赞同来自:
shwtz - 学物理想做演员的IT男
赞同来自: