[英]ElasticSearch terms_stats query - exclude terms from result
我目前有一个术语方面,可以使用exclude选项从其结果中排除某些术语。 我对term_stats方面进行了相同的尝试,但未删除相同的结果。
我查看了Elasticsearch文档( http://www.elasticsearch.org/guide/reference/api/search/facets/terms-stats-facet/ ),发现term_stats构面似乎没有排除选项。 由于我并不总是相信我对Elasticsearch文档的完整解释,因此我希望查看是否有人找到了解决方法(除了在客户端处理结果外)。
此构面无法按预期工作:
"keywords_bad":{
"terms_stats":{
"size":100,
"value_field":"retweet_count",
"exclude":["http","consected"],
"order":"total",
"key_field":"text"
}
}
而此方面按预期工作:
"keywords_good":{
"terms":{
"size":100,
"exclude":["http","consected"],
"order":"count",
"field":"text"
}
}
任何合理的建议将不胜感激,因为这似乎有点不一致。
更新
根据imotov接受的答案,我在GitHub上创建了一个问题, 网址为https://github.com/elasticsearch/elasticsearch/issues/2916
terms_stats方面目前不支持排除。 我建议在github上创建一个问题,要求添加它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.