Field calculate with painless script and filter

Hello,

We have a field in ELK 7.1.1 calculate like that :
name field : RESULT
script : doc['ORIG1BEFORE'].value-doc['ORIG2AFTER'].value

when we display it, it display 0 or other no null value.

When we do a filter in visualize filter with RESULT >0 it display some value with 0 value

We don't understand why ...

if you have ideas.. thanks in advance

Can you describe your index shape a little more? What is value-doc?

Can you show us an example JSON document?

hello,
it's the value of ORIG1BEFORE minus value of ORIG2AFTER

in fact we put FEE>1 and it's work like expected