mshabeeb
mshabeeb

Reputation: 585

Kibana scripted field

I am trying to write a scripted field in Kibana 4.5.1 in order to extract the hour from the @timestampt field. I just followed the example in the following link but it gives me a parsing error: https://www.elastic.co/blog/kibana-4-beta-3-now-more-filtery

Now in the link it says that this does not work starting from Kibana 4.0.0 since scripted field are now based on Lucene. So does anybody know what the equivalent code in Lucene would be? The Groovy expression is as follows: Integer.parseInt(new Date(doc["@timestamp"].value).format("H")) where @timestamp is the field's name which contains a date in the format MMM dd HH:mm:ss.SSS and I need to extract the HH values.

Upvotes: 0

Views: 8073

Answers (1)

Related Questions