X/y shards failed in data table visualization when applying aggregation on scripted fields

I am using a data table visualization to show data. I used the count metric, along with 7 sub-buckets that are all aggregations of the type 'Terms'. Two fields out of the 7 on which aggregation is applied are scripted fields. When I run this over a month's time period, Error stating 'x/y shards failed', or 'Error creating visualization, Request timeout.'

All the 7 fields are absolutely necessary to be shown in this data table. If I remove one scripted field, this works fine. But if I add the aggregation on that field again, it crashes. Can you please help with this?


Does all documents contain the fields used to calculate the scripted fields? Do you check to verify that the fields exist before using them so you can provide a default value in case they do not exist?

Yes Christian, all the documents contain the scripted field.

That is not exactly what I asked. Let me rephrase. Does all the documents contain all the fields used in the calculation of the scripted field? Does the definition of your scripted field check for existence?

Can you show an example of a scripted field definition?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.