es 查询a索引中 tag=yes 并且 tag2=xxx的数据 展示100条
你可以使用以下的Elasticsearch查询语句来实现你的需求:
{
"size": 100,
"query": {
"bool": {
"must": [
{
"term": {
"tag": "yes"
}
},
{
"term": {
"tag2": "xxx"
}
}
]
}
}
}
这个查询语句使用了bool查询来将两个条件进行组合,并且使用term查询来匹配指定字段的值。你可以将这个查询语句发送给Elasticsearch来执行,并且将结果展示给用户。
原文地址: https://www.cveoy.top/t/topic/jfH4 著作权归作者所有。请勿转载和采集!