Custom return fields with native scripts


I'm currently looking for a solution to the following problem:

I've got a few formula's which need to be calculated by using data inside
an elasticsearch index and filter parameters as arguments. This formula
needs to be calculated for each record in a specific index.

I can create a native script which calculates the result for each function,
and craft a score out of it. What I would like is to return the result of
each function and 'append' it to the document, so the one performing the
query with the specific function can see the outcome of each formula.

Could you tell me if this is possible in elasticsearch (by using native
functions?) / how I can achieve this?



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
To view this discussion on the web visit
For more options, visit