# FieldMapper multiple scripts

**URL:** <https://discuss.elastic.co/t/fieldmapper-multiple-scripts/173825>\
**Category:** Elasticsearch\
**Created:** [March 25, 2019, 8:06pm UTC](https://discuss.elastic.co/t/fieldmapper-multiple-scripts/173825 "2019-03-25T20:06:35Z")\
**Posts on this page:** 3\
**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 25, 2019, 8:06pm UTC](https://discuss.elastic.co/t/fieldmapper-multiple-scripts/173825/1 "2019-03-25T20:06:35Z")

</div>

Hello team, I have a small problem more than anything to be able to establish multiple script since previously I could establish it in 2.4 with

```auto
module.registerScript(NextOccurrenceSearchScript.SCRIPT_NAME, NextOccurrenceSearchScript.Factory.class);
        module.registerScript(HasOccurrencesAtSearchScript.SCRIPT_NAME, HasOccurrencesAtSearchScript.Factory.class);

```

in the new version 6.6 you have an example? I am new and I have more than 2 weeks and nothing. ☹

---

<div class="post-metadata">

**Author:** ![jimczi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jimczi/32/47985_2.png) [@jimczi](https://discuss.elastic.co/u/jimczi)\
**Post date:** [March 26, 2019, 10:00am UTC](https://discuss.elastic.co/t/fieldmapper-multiple-scripts/173825/2 "2019-03-26T10:00:00Z")

</div>

There is an example plugin in the repository:

> **[elastic/elasticsearch](https://github.com/elastic/elasticsearch/tree/6.6/plugins/examples/script-expert-scoring)**
>
> Open Source, Distributed, RESTful Search Engine. Contribute to elastic/elasticsearch development by creating an account on GitHub.

  
You can checkout this example and adapt the code to your needs.

---

<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:** [April 23, 2019, 10:00am UTC](https://discuss.elastic.co/t/fieldmapper-multiple-scripts/173825/3 "2019-04-23T10:00:04Z")

</div>

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