Painless script: can not write type [class java.math.BigDecimal]

I am facing this exception on my discover page when trying to view my logs.
Previously, I had a field involving BigDecimal and worked fine.
this was the script:

if(!(doc[‘obyts.keyword’].size()==0)) {
    String b_str = doc[‘obyts.keyword’].value;
    BigDecimal bytes = new BigDecimal(b_str);
    BigDecimal eight = BigDecimal.valueOf(8.0);
    return bytes.multiply(eight).divide(BigDecimal.valueOf(1000000000L));
}

The script was to take bytes and change to Gigabits. Then i created a dashboard that was showing Gbps. I have scripted fields involving BigInteger that are working fine. I am new to ELK so any help would be appreciated!

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