Closed
Description
Hello! I have hit a bug with using FilterAggregator inside of a AggregationContainer. When applying a raw FilterDescription, the resulting json does not appear inside of the request.
I have the following code:
var searchRequest = new SearchRequest()
{
Aggregations = new Dictionary<string, IAggregationContainer>(),
};
var filterContainer = new AggregationContainer()
{
Filter = new FilterAggregator
{
Filter = new FilterDescriptor<dynamic>().Raw(@"{""test"":""test""")
},
Aggregations = new Dictionary<string, IAggregationContainer>()
};
searchRequest.Aggregations["base_filter"] = filterContainer;
var response = esClient.Search<dynamic>(searchRequest);
And this is the request generated by NEST:
{
"aggs": {
"base_filter": {
"filter": {},
"aggs": {}
}
}
}
As you can see, the {"test":"test"} from the FilterDescriptor does not appear inside of the request. Is there something that I am missing?
I am using Elasticsearch.Net 1.7.1
Metadata
Metadata
Assignees
Labels
No labels