# How to pass params into script as HashSet

**URL:** <https://discuss.elastic.co/t/how-to-pass-params-into-script-as-hashset/297224>\
**Category:** Elasticsearch\
**Created:** [February 15, 2022, 10:00am UTC](https://discuss.elastic.co/t/how-to-pass-params-into-script-as-hashset/297224 "2022-02-15T10:00:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![megatron90000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/megatron90000/32/101831_2.png) [@megatron90000](https://discuss.elastic.co/u/megatron90000)\
**Post date:** [February 15, 2022, 10:00am UTC](https://discuss.elastic.co/t/how-to-pass-params-into-script-as-hashset/297224/1 "2022-02-15T10:00:39Z")

</div>

I want to pass params in my script function as HashSet for fast contains check with complexity O(1).  
As I know, standart params list is ArrayList.  
How can I do this?  
Can I use ScriptEngine java?

---

<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:** [March 15, 2022, 10:01am UTC](https://discuss.elastic.co/t/how-to-pass-params-into-script-as-hashset/297224/2 "2022-03-15T10:01:13Z")

</div>

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