# MVEL vs Javascript scripting plugin? Which scripting plugin is recommended for speed?

**URL:** <https://discuss.elastic.co/t/mvel-vs-javascript-scripting-plugin-which-scripting-plugin-is-recommended-for-speed/14614>\
**Category:** Elasticsearch\
**Created:** [November 27, 2013, 11:48am UTC](https://discuss.elastic.co/t/mvel-vs-javascript-scripting-plugin-which-scripting-plugin-is-recommended-for-speed/14614 "2013-11-27T11:48:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vaidik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vaidik/32/1134_2.png) [@vaidik](https://discuss.elastic.co/u/vaidik)\
**Post date:** [November 27, 2013, 11:48am UTC](https://discuss.elastic.co/t/mvel-vs-javascript-scripting-plugin-which-scripting-plugin-is-recommended-for-speed/14614/1 "2013-11-27T11:48:20Z")

</div>

Hey folks,

In the past few days I have learned that scripts are expensive. I was using  
scripts in term facets and that would give me horrible performance as  
compared to using terms facet with forming a term similar to what the  
script would produce and push it in ES at the time of indexing documents.

Although there are cases where I really don't think there is way for me to  
avoid using scripts. I am not using scripts in facets but I do need them at  
the time of updating documents. The rate at which I am updating documents  
is pretty high as well.

By default ES comes with MVEL as the default scripting language. But there  
are scripting plugins for Javascript, Groovy and Python as well. My  
question is which should I use for performance? As in which plugin has the  
fastest script evaluation and execution engine (in context of ES)?

Looking forward to some valuable inputs on this one.

Thanks,  
Vaidik Kapoor  
vaidikkapoor.info

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CACWtv5%3DyGEW9P2CUj\_Q8%2Bfj-oQMSykhyQ6zaADm%2BOotwvieZ7A%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CACWtv5%3DyGEW9P2CUj_Q8%2Bfj-oQMSykhyQ6zaADm%2BOotwvieZ7A%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 27, 2013, 11:59am UTC](https://discuss.elastic.co/t/mvel-vs-javascript-scripting-plugin-which-scripting-plugin-is-recommended-for-speed/14614/2 "2013-11-27T11:59:16Z")

</div>

Also native scripts (java): [http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-scripting.html#\_native\_java\_scripts](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-scripting.html#_native_java_scripts)

See first line:  
Even though mvel is pretty fast, allow to register native Java based scripts for faster execution.

HTH

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 27 novembre 2013 at 12:48:44, Vaidik Kapoor ([kapoor.vaidik@gmail.com](mailto:kapoor.vaidik@gmail.com)) a écrit:

Hey folks,

In the past few days I have learned that scripts are expensive. I was using scripts in term facets and that would give me horrible performance as compared to using terms facet with forming a term similar to what the script would produce and push it in ES at the time of indexing documents.

Although there are cases where I really don't think there is way for me to avoid using scripts. I am not using scripts in facets but I do need them at the time of updating documents. The rate at which I am updating documents is pretty high as well.

By default ES comes with MVEL as the default scripting language. But there are scripting plugins for Javascript, Groovy and Python as well. My question is which should I use for performance? As in which plugin has the fastest script evaluation and execution engine (in context of ES)?

Looking forward to some valuable inputs on this one.

## Thanks, Vaidik Kapoor vaidikkapoor.info

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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CACWtv5%3DyGEW9P2CUj\_Q8%2Bfj-oQMSykhyQ6zaADm%2BOotwvieZ7A%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CACWtv5%3DyGEW9P2CUj_Q8%2Bfj-oQMSykhyQ6zaADm%2BOotwvieZ7A%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.5295de94.12200854.3e14%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.5295de94.12200854.3e14%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Andrej](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@Andrej](https://discuss.elastic.co/u/Andrej)\
**Post date:** [November 27, 2013, 12:03pm UTC](https://discuss.elastic.co/t/mvel-vs-javascript-scripting-plugin-which-scripting-plugin-is-recommended-for-speed/14614/3 "2013-11-27T12:03:39Z")

</div>

From what we've measured providing script in native java is way faster than  
mvel.

Greets,  
Andrej

Am Mittwoch, 27. November 2013 12:48:20 UTC+1 schrieb Vaidik Kapoor:

> Hey folks,
> 
> In the past few days I have learned that scripts are expensive. I was  
> using scripts in term facets and that would give me horrible performance as  
> compared to using terms facet with forming a term similar to what the  
> script would produce and push it in ES at the time of indexing documents.
> 
> Although there are cases where I really don't think there is way for me to  
> avoid using scripts. I am not using scripts in facets but I do need them at  
> the time of updating documents. The rate at which I am updating documents  
> is pretty high as well.
> 
> By default ES comes with MVEL as the default scripting language. But there  
> are scripting plugins for Javascript, Groovy and Python as well. My  
> question is which should I use for performance? As in which plugin has the  
> fastest script evaluation and execution engine (in context of ES)?
> 
> Looking forward to some valuable inputs on this one.
> 
> Thanks,  
> Vaidik Kapoor  
> vaidikkapoor.info

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/870d3f35-01a3-41ef-a760-cc59961d3130%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/870d3f35-01a3-41ef-a760-cc59961d3130%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:04am UTC](https://discuss.elastic.co/t/mvel-vs-javascript-scripting-plugin-which-scripting-plugin-is-recommended-for-speed/14614/4 "2017-07-06T02:04:35Z")

</div>


