My first question: Can a scripted_field be used for searching?
Assuming it can, are there performance issues with that?
Does the ArrayList object have Map method (like Array.prototype.map in javascript)?
I have lift of Gifts stored with in index, and I want to use a scripted_field to get the total amount over a given period.
I've started with this:
int total = 0; for (def gift : ctx._source.Gifts) { total+=gift.Amount} return total
But I keep keep getting a null reference exception. Same thing when I tried without the ctx