es 查询a索引中 tag=yes的数据 展示100条
在 Elasticsearch 中查询 a 索引中 tag='yes' 的数据并展示 100 条,可以使用以下查询语句:
GET a/_search
{
"query": {
"term": {
"tag.keyword": "yes"
}
},
"size": 100
}
在这个查询语句中,a 是索引名称,tag 是字段名称,yes 是要匹配的值。term 查询用于精确匹配字段的值。size 参数用于指定返回的文档数量。
执行上述查询语句后,Elasticsearch 将返回 100 条 tag 字段为 'yes' 的文档数据。
原文地址: https://www.cveoy.top/t/topic/jfHE 著作权归作者所有。请勿转载和采集!