# Help - Create Plugin 6.6

**URL:** <https://discuss.elastic.co/t/help-create-plugin-6-6/173543>\
**Category:** Elasticsearch\
**Created:** [March 22, 2019, 5:37pm UTC](https://discuss.elastic.co/t/help-create-plugin-6-6/173543 "2019-03-22T17:37:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![EliuFlorez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eliuflorez/32/40884_2.png) [@EliuFlorez](https://discuss.elastic.co/u/EliuFlorez)\
**Post date:** [March 22, 2019, 5:37pm UTC](https://discuss.elastic.co/t/help-create-plugin-6-6/173543/1 "2019-03-22T17:37:56Z")

</div>

Hi guys, I need a little help. Ante in ElasticSearch version 2.4 to add several scripts to a plugin was with 'module.registerScript ()' now in version 6.6 how should I add my various scripts? I have not found the way it should be. A little help would be good. Greetings.

My Code GitHub: [https://github.com/EliuFlorez/recurring-plugin](https://github.com/EliuFlorez/recurring-plugin)

**before plugin:**

```auto
package org.devmaster.elasticsearch.plugin;

import org.devmaster.elasticsearch.index.mapper.RecurringFieldMapper;
import org.devmaster.elasticsearch.script.*;
import org.elasticsearch.indices.IndicesModule;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.script.ScriptModule;

public class RecurringPlugin extends Plugin {

    public String name() {
        return "native-recurring-plugin";
    }

    public String description() {
        return "Native script to allow recurring feature";
    }

    public void onModule(ScriptModule module) {
        module.registerScript(NextOccurrenceSearchScript.SCRIPT_NAME, NextOccurrenceSearchScript.Factory.class);
        module.registerScript(HasOccurrencesAtSearchScript.SCRIPT_NAME, HasOccurrencesAtSearchScript.Factory.class);
        module.registerScript(OccurBetweenSearchScript.SCRIPT_NAME, OccurBetweenSearchScript.Factory.class);
        module.registerScript(NotHasExpiredSearchScript.SCRIPT_NAME, NotHasExpiredSearchScript.Factory.class);
        module.registerScript(OccurrencesBetweenSearchScript.SCRIPT_NAME, OccurrencesBetweenSearchScript.Factory.class);
        module.registerScript(HasAnyOccurrenceBetweenSearchScript.SCRIPT_NAME, HasAnyOccurrenceBetweenSearchScript.Factory.class);
    }

    public void onModule(IndicesModule module) {
        module.registerMapper(RecurringFieldMapper.CONTENT_TYPE, new RecurringFieldMapper.TypeParser());
    }

}

```

**now plugin:**

```auto
???????????????????????????????????

```

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [March 25, 2019, 1:43pm UTC](https://discuss.elastic.co/t/help-create-plugin-6-6/173543/2 "2019-03-25T13:43:14Z")

</div>

check out `org.elasticsearch.plugins.ScriptPlugin` and implement that class with a custom script engine in your plugin.

--Alex

---

<div class="post-metadata">

**Author:** ![EliuFlorez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eliuflorez/32/40884_2.png) [@EliuFlorez](https://discuss.elastic.co/u/EliuFlorez)\
**Post date:** [March 25, 2019, 2:18pm UTC](https://discuss.elastic.co/t/help-create-plugin-6-6/173543/4 "2019-03-25T14:18:48Z")

</div>

Hello, I really do not know much about java and I do not know how to implement that part. If you can help me or collaborate it would be a great help friend. here the step of the repository link.

[https://github.com/EliuFlorez/recurring-plugin](https://github.com/EliuFlorez/recurring-plugin)

Thanks.

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [March 25, 2019, 3:19pm UTC](https://discuss.elastic.co/t/help-create-plugin-6-6/173543/5 "2019-03-25T15:19:07Z")

</div>

This forum is here to help in case you are running into issues when converting that plugin, but I am personally not here to rewrite your plugin, sorry 🙂

You will definitely need some amount of java knowledge to convert the codebase. However there is also a sample scripting plugin, you can take some inspiration from [https://github.com/elastic/elasticsearch/tree/6.6/plugins/examples/script-expert-scoring](https://github.com/elastic/elasticsearch/tree/6.6/plugins/examples/script-expert-scoring)

---

<div class="post-metadata">

**Author:** ![EliuFlorez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eliuflorez/32/40884_2.png) [@EliuFlorez](https://discuss.elastic.co/u/EliuFlorez)\
**Post date:** [March 25, 2019, 3:33pm UTC](https://discuss.elastic.co/t/help-create-plugin-6-6/173543/6 "2019-03-25T15:33:17Z")

</div>

thanks, I'm taking that example plugin.

---

<div class="post-metadata">

**Author:** ![EliuFlorez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eliuflorez/32/40884_2.png) [@EliuFlorez](https://discuss.elastic.co/u/EliuFlorez)\
**Post date:** [April 4, 2019, 2:55pm UTC](https://discuss.elastic.co/t/help-create-plugin-6-6/173543/7 "2019-04-04T14:55:44Z")

</div>

Help: [Plugin Custom - Multi Source?](https://discuss.elastic.co/t/plugin-custom-multi-source/175439)

---

<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:** [May 2, 2019, 2:55pm UTC](https://discuss.elastic.co/t/help-create-plugin-6-6/173543/8 "2019-05-02T14:55:44Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
