Scripted filed is not working


(uday kiran) #1

HI,

I created scripted field on numeric field with following expression and painless script,

doc['field'].sum()

but its not working.
I am using ELK - 5.4.0 version

its not giving any error, but values always are 1's or 0's
Can somebody please help with this.

Also Is there any way to calculate count like doc['field'].count().

Thanks in advance

Uday.K


(Thomas Neirynck) #2

@udaykirankona

Where did you find a reference to those sum and count methods?

In Kibana, scripted fields transform one or more document values into a new value (on a per document basis).

To get started, see:


(uday kiran) #3

Hi thomas,

Please look into the following link,

https://www.elastic.co/guide/en/elasticsearch/reference/5.4/modules-scripting-expression.html

Thanks,
Uday.K


(Thomas Neirynck) #4

That link seems to be for array-values for a document, not over all the documents in the index.


(system) #5

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