Hello,
I have a SearchGroupedErrorByCriteria method for take data on Elasticsearch and view it on a admin panel table.
I'm using Elasticsearch .NET Client. I have a search descriptor:
var searchDescriptor = new SearchRequestDescriptor<ServiceLogMonitoringFieldModel>(indexName);
I add a query like this to my search descriptor and it has some aggregations:
searchDescriptor
.Size(0)
.Query(q => q
.Bool(b => b
.Filter(queryDescriptorsFilter.Any() ? queryDescriptorsFilter.ToArray() : null)
.Must(queryDescriptorsMust.Any() ? queryDescriptorsMust.ToArray() : null)
.MustNot(queryDescriptorsMustNot.Any() ? queryDescriptorsMustNot.ToArray() : null)
))
.Sort(sortOptionsDescriptor.Any() ? sortOptionsDescriptor.ToArray() : null)
.Aggregations(a => a
.Terms("group_IcCode", avg => avg
.Size(10000)
.Field(p => p.IcCode)
.Aggregations(aa => aa
.Terms("group_BmvProductNo", t2 => t2
.Size(10000)
.Field(f => f.BmvProductNo)
.Aggregations(aaa => aaa
.Terms("group_ErrorMessage", t3 => t3
.Field(f => f.ErrMessage.Suffix("keyword"))
.Size(10000)
.Aggregations(aaaa => aaaa
.Max("max_log_date", m => m
.Field(f => f.LogDateUtc)
)
)
)
)
)
)
)
);
When I made a request with this query, I realized that I could not see some values in the date range. 5-6 pieces of data were missing, and the data that was missing was data whose text field named ErrMessage was larger than 256 characters. I don't encounter the same problem without using aggregation. Could you please help about this?
Thanks.