# Native (java) scripts

**URL:** <https://discuss.elastic.co/t/native-java-scripts/17689>\
**Category:** Elasticsearch\
**Created:** [May 23, 2014, 9:28am UTC](https://discuss.elastic.co/t/native-java-scripts/17689 "2014-05-23T09:28:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cuarto\_Espada](https://avatars.discourse-cdn.com/v4/letter/c/57b2e6/32.png) [@Cuarto\_Espada](https://discuss.elastic.co/u/Cuarto_Espada)\
**Post date:** [May 23, 2014, 9:28am UTC](https://discuss.elastic.co/t/native-java-scripts/17689/1 "2014-05-23T09:28:48Z")

</div>

Hi, I installed ES 1.1.0 under ubuntu 14, and I need to make custom  
functions for search, so I read  
[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-scripting.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-scripting.html),  
and  
[http://www.spacevatican.org/2012/5/12/elasticsearch-native-scripts-for-dummies/](http://www.spacevatican.org/2012/5/12/elasticsearch-native-scripts-for-dummies/)  
,  
but I didn't understand how ES finds the script, so if I have a jar file,  
should I put it in a specific directory and define a path in  
elasticsearch.yml file? I know I must write

script.native: mynativescript.type: org.spacevatican.elasticsearchexample.CustomScriptFactory

but I dont know where to place the script

--  
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/4226cc43-cc36-4ec6-b96b-ae4c9fb4d1df%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4226cc43-cc36-4ec6-b96b-ae4c9fb4d1df%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [May 23, 2014, 8:33pm UTC](https://discuss.elastic.co/t/native-java-scripts/17689/2 "2014-05-23T20:33:02Z")

</div>

Elasticsearch will load any jar file in the $ES\_HOME/lib directory at  
startup.

Here is another resource:

> **[GitHub - imotov/elasticsearch-native-script-example: Example of Now...](https://github.com/imotov/elasticsearch-native-script-example)**
>
> Example of Now Deprecated Native Script Plugin for Elasticsearch - GitHub - imotov/elasticsearch-native-script-example: Example of Now Deprecated Native Script Plugin for Elasticsearch

--  
Ivan

On Fri, May 23, 2014 at 2:28 AM, Cuarto Espada [massacrator.wow@gmail.com](mailto:massacrator.wow@gmail.com)wrote:

> Hi, I installed ES 1.1.0 under ubuntu 14, and I need to make custom  
> functions for search, so I read  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-scripting.html),  
> and  
> [Elasticsearch native scripts for dummies - Space Vatican](http://www.spacevatican.org/2012/5/12/elasticsearch-native-scripts-for-dummies/),  
> but I didn't understand how ES finds the script, so if I have a jar file,  
> should I put it in a specific directory and define a path in  
> elasticsearch.yml file? I know I must write
> 
> script.native: mynativescript.type: org.spacevatican.elasticsearchexample.CustomScriptFactory
> 
> but I dont know where to place the script
> 
> --  
> 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/4226cc43-cc36-4ec6-b96b-ae4c9fb4d1df%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4226cc43-cc36-4ec6-b96b-ae4c9fb4d1df%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/4226cc43-cc36-4ec6-b96b-ae4c9fb4d1df%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/4226cc43-cc36-4ec6-b96b-ae4c9fb4d1df%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CALY%3DcQCedhNpU1q57JAZ23FB\_upU86P%3Di8CxrGSQ76TOQXozkg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCedhNpU1q57JAZ23FB_upU86P%3Di8CxrGSQ76TOQXozkg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:27am UTC](https://discuss.elastic.co/t/native-java-scripts/17689/3 "2017-07-06T01:27:18Z")

</div>


