es根据字段长度过滤_Es 根据数组长度查询

这篇博客介绍了如何在Elasticsearch(ES)中根据字段的长度进行过滤查询,以找到materials字段长度小于3的数据记录。示例展示了一条包含多个字段如adTimeStart、fluxIds、materials等的数据,并具体说明了如何针对materials数组长度进行查询。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

数据结构如下:例如搜索 materials.length<3 的所有数据{"_index": "hv-advertisement-ol",

"_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

}}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值