ES 查询 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/dTXv 著作权归作者所有。请勿转载和采集!