-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
I have a use case where I need to do aggregation on multiple columns using C#. I am using NEST libraries for this and I am facing the following issue
Query C# :
var searchRequest = new SearchRequest
{
SearchType = SearchType.Count,
Query = query,
Aggregations = new Dictionary<string, IAggregationContainer>
{
{ "a", new AggregationContainer
{
ExtendedStats = new ExtendedStatsAggregator()
{
Field = "a"
}
}
},
{ "b", new AggregationContainer
{
ExtendedStats = new ExtendedStatsAggregator()
{
Field = "b"
}
}
}
}
};
When I receive response from NEST, however I am getting only result for one aggregation. I am looking at SearchResult.Agg dictionary but it has only one entry for one aggregation field instead of two. Let me know if I am missing soemthing or is it some issue with NEST libraries
When I print the SearchResponse.ConnectionStatus I can see that both the aggregations are returned. The problem I am facing is that my SearchResults.Aggs.ExtendendStats() has only details of first aggregation.
Some how the deserialization in NEST is dropping the second aggregation though the response correctly came from ES