# How to pass multiple terms as a param in script scoring

**URL:** <https://discuss.elastic.co/t/how-to-pass-multiple-terms-as-a-param-in-script-scoring/237240>\
**Category:** Elasticsearch\
**Created:** [June 16, 2020, 7:34am UTC](https://discuss.elastic.co/t/how-to-pass-multiple-terms-as-a-param-in-script-scoring/237240 "2020-06-16T07:34:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dahea\_Moon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dahea_moon/32/50610_2.png) [@Dahea\_Moon](https://discuss.elastic.co/u/Dahea_Moon)\
**Post date:** [June 16, 2020, 7:34am UTC](https://discuss.elastic.co/t/how-to-pass-multiple-terms-as-a-param-in-script-scoring/237240/1 "2020-06-16T07:34:31Z")

</div>

I'm making custom score script plugin for scoring based on payload value.

I've done with scoring logic, but it's working properly when it receives only one term.

I want to receive several analyzed terms in query. How can I receive several terms as array or list in params?

```auto
params: {"field": "field", "term": ["term1", "term2", "term3"]}

```

i want this type of params to work.

here is my code. I followed script example in elasticsearch github.  
i'm working with gradle and java 14.

---

<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 14, 2020, 7:34am UTC](https://discuss.elastic.co/t/how-to-pass-multiple-terms-as-a-param-in-script-scoring/237240/2 "2020-07-14T07:34:39Z")

</div>

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