Reputation: 1656
In simple terms, I have this query:
POST /my_index/_search
{
"query": {
"filtered": {
"query": {
"query_string": {
"query": "my_query_text"
}
}
}
},
"post_filter": {
"term": {
"topics": [
"top1",
"top2"
]
}
},
"aggs": {
"authors": {
"terms": {
"field": "authors"
}
}
}
}
which I want to replicate using the C# NEST client.
I can't find a way of adding a post_filter in the NEST client though?
Help?
Upvotes: 3
Views: 1244
Reputation: 17441
In SearchDescriptor it is referred to by method "Filter" instead of PostFilter.
There is an open issue in github with regard to naming it more appropriately which most probably will be fixed in 2.0.
Upvotes: 2