# Reloading native script factory w/o ES downtime

**URL:** <https://discuss.elastic.co/t/reloading-native-script-factory-w-o-es-downtime/8036>\
**Category:** Elasticsearch\
**Created:** [June 10, 2012, 9:49pm UTC](https://discuss.elastic.co/t/reloading-native-script-factory-w-o-es-downtime/8036 "2012-06-10T21:49:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Colin\_Dellow](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/colin_dellow/32/2818_2.png) [@Colin\_Dellow](https://discuss.elastic.co/u/Colin_Dellow)\
**Post date:** [June 10, 2012, 9:49pm UTC](https://discuss.elastic.co/t/reloading-native-script-factory-w-o-es-downtime/8036/1 "2012-06-10T21:49:15Z")

</div>

I've implemented a native script factory to provide custom scoring,  
and I'm wondering if it's possible to rev the jar and the underlying  
implementation without having to restart ES.

Apologies if this is a naive question--I don't have much background in  
either the JVM world or the ES world.

Is the answer just run a cluster with at least 2 nodes and cycle nodes  
out of the cluster to restart them?

Cheers,  
colin

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [June 13, 2012, 5:55pm UTC](https://discuss.elastic.co/t/reloading-native-script-factory-w-o-es-downtime/8036/2 "2012-06-13T17:55:48Z")

</div>

There is no way to reload native scripts, though it is optionally possible  
to implement on the JVM (though tricky). Note though that you can provide  
parameters to a native script, so you can have those affect the  
calculations to a degree.

On Sun, Jun 10, 2012 at 11:49 PM, Colin Dellow [cldellow@gmail.com](mailto:cldellow@gmail.com) wrote:

> I've implemented a native script factory to provide custom scoring,  
> and I'm wondering if it's possible to rev the jar and the underlying  
> implementation without having to restart ES.
> 
> Apologies if this is a naive question--I don't have much background in  
> either the JVM world or the ES world.
> 
> Is the answer just run a cluster with at least 2 nodes and cycle nodes  
> out of the cluster to restart them?
> 
> Cheers,  
> colin

---

<div class="post-metadata">

**Author:** ![Colin\_Dellow](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/colin_dellow/32/2818_2.png) [@Colin\_Dellow](https://discuss.elastic.co/u/Colin_Dellow)\
**Post date:** [June 15, 2012, 7:32pm UTC](https://discuss.elastic.co/t/reloading-native-script-factory-w-o-es-downtime/8036/3 "2012-06-15T19:32:03Z")

</div>

On Wednesday, 13 June 2012 13:55:48 UTC-4, kimchy wrote:

> There is no way to reload native scripts, though it is optionally possible  
> to implement on the JVM (though tricky). Note though that you can provide  
> parameters to a native script, so you can have those affect the  
> calculations to a degree.

Thanks, Shay. I definitely don't want to get involved with crazy things  
with the class loaders and we are currently using parameters, so hopefully  
this is a rare occurrence (e.g. a bugfix).

I'm going to investigate if we can run 2 nodes on 1 box (1 master + 1  
data), and then bring up another data node whenever we rev the jar.

Long term, I guess this would be a non-issue because we'd actually have a  
proper cluster, but in the short term, hopefully this works.

---

<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, 3:23am UTC](https://discuss.elastic.co/t/reloading-native-script-factory-w-o-es-downtime/8036/4 "2017-07-06T03:23:48Z")

</div>

Closed on July 6, 2017, 3:23am UTC


