Elasticsearch groovy script execution

Hello everybody,

I'm using groovy scripts via the es update API to update some existing document in es.
Can somebody tell me how the groovy script is executed? i.e. in a separate java process, or in the process which runs es node?

I'm talking about es 2.x.

Thanks!

The Groovy script is run inside the ES process. Running a separate process for it would be prohibitively expensive.