How to conduct field connection operation


(michaelshi) #1

Create fields Scripted

doc['@timestamp'].getYear() return 2016
doc['@timestamp'].getMonth() return 02
doc['@timestamp'].getDayOfMonth() return 16
I would like to return 201616 or 20160216 or 201602 etc.
I use doc['@timestamp'].getMonth() doc['@timestamp'].getYear() are reported to the wrong
doc['@timestamp'].getYear().toString() + doc['@timestamp'].getMonth().toString() the same
doc['@timestamp'].getYear() - doc['@timestamp'].getMonth() the return 2014(2016-02) I want return 201602

How to carry out the digital extraction connection operation?

Thanks.


(Tanya Bragin) #2

Lucene expressions, which is the default Kibana query language, does not support string operations. In the future this will be possible with Painless scripting.


(system) #3