Full script support for Custom Score Query

Hello,
I'm trying to write Custom Score Query, but it looks like that I need more
when just expression for my script.
I have to loop through multi-valued field and count the score based on a
specific logic and values are found in the field.
Something like this:

var result=0;
foreach(c:doc['myMultiField'].values){
//Some logic here which adjust the result
}
return result;

Is it possible to do in ES, or I should write Native Script?

Thank you,
Eugene

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.