Scripted Field - Change from 6.7 to 7.3?

I recently moved from 6.7 to 7.3 and my few scripted fields no longer seem to work. If present, I see shard errors and no records, if removed, the records appear fine (less the calculated value I want, of course). Here's one that's as basic as can be:

doc['amount'].value - doc['billed20'].value

From the source document, the amount field is always populated, but billed20 is sparse, with either a number or blank. Since my move to 7.3, do I need to account for sparse data? Did 6.7 assume blank means 0, where 7.3 doesn't?

Engineer helped... this fixes it:

return doc['amount'].value
return doc['amount'].value - doc['billed20'].value

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