Hi,
Here is a nest code:
var request=new SearchRequest<Data>
{
Aggregations = new AggregationDictionary
{
{
"exemple", new TermsAggregation("attribute"){
Field="attribute",
Size=100
}
}
},
Size=0
};
Console.WriteLine(client.RequestResponseSerializer.SerializeToString(request));
return client.Search<Data>(request).Aggregations;
This is the request that is created and used by nest:
{"aggs":{"exemple":{"terms":{"field":"attribute","size":100}}},"size":0}
When I use it in kibana i get the correct result:
{
"aggregations" : {
"premier" : {
"doc_count_error_upper_bound" : 0,
"sum_other_doc_count" : 0,
"buckets" : [
{
"key" : "com",
"doc_count" : 413
},
{
"key" : "fr",
"doc_count" : 121
},
{
"key" : "ru",
"doc_count" : 109
},
]
}
}
}
when I use nest I get the same number of results in items but all the results are empty:
what's the reason for it?