I have created the scripted field as the following. I hope to perform a divide calculation for the sum of field1 and field2 with field3. But the below scripted fields can't be calculated. What's wrong with the below script?
(doc['field1'].value + doc['field2'].value) / doc['field3'].value