简单来说,我有这个查询:
POST /my_index/_search
{
"query": {
"filtered": {
"query": {
"query_string": {
"query": "my_query_text"
}
}
}
},
"post_filter": {
"term": {
"topics": [
"top1",
"top2"
]
}
},
"aggs": {
"authors": {
"terms": {
"field": "authors"
}
}
}
}
我想使用 C# NEST 客户端复制它。
但我找不到在 NEST 客户端中添加 post_filter 的方法?
帮忙吗?
最佳答案
在 SearchDescriptor 中,它由方法 "Filter" 引用,而不是 后过滤器。
有一个open issue在 github 中关于更恰本地命名它很可能会在 2.0 中修复。
关于c# - 如何使用 C# NEST 客户端将 post_filter 添加到 ElasticSearch 查询?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27023331/