如何查询nested下数据条数大于2条的数据
PUT /test
{
"mappings": {
"properties": {
"id": {
"type": "long"
},
"name": {
"type": "text"
},
"no": {
"type": "keyword"
},
"sub": {
"type": "nested",
"properties": {
"id": {
"type": "long"
},
"title": {
"type": "text"
},
"msg": {
"type": "text"
},
"num": {
"type": "keyword"
}
}
}
}
}
}
PUT /test
{
"mappings": {
"properties": {
"id": {
"type": "long"
},
"name": {
"type": "text"
},
"no": {
"type": "keyword"
},
"sub": {
"type": "nested",
"properties": {
"id": {
"type": "long"
},
"title": {
"type": "text"
},
"msg": {
"type": "text"
},
"num": {
"type": "keyword"
}
}
}
}
}
}
3 个回复
bufanyun - es小白
赞同来自:
a2dou
赞同来自:
tongchuan1992 - 学无止境、学以致用
赞同来自: