I have created a scripted field to get dayOfWeek from date field as below:
if (doc['result.opened_at'].size() != 0)
{
if (!doc['result.opened_at'].empty) {
doc['result.opened_at'].value.dayOfWeek
}
}
I could see the field created and populates the value in discover.
Could you please provide an example of the type of documents you are querying? Maybe just the _source for a few of them would be helpful.
And just to make sure I understood your question: you are seeing the field listed in discover with no issues, but when you try to do a terms aggregation against the field for the same timerange you see no results?
Hi @lukeelmers,
I have ElasticSearch on version 7.5.0. You got it right, in discover I see the field generated but in kibana term aggregate do not provide any result, shows blank graph
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.