# Painless script too long

**URL:** <https://discuss.elastic.co/t/painless-script-too-long/246043>\
**Category:** Elasticsearch\
**Created:** [August 24, 2020, 1:36am UTC](https://discuss.elastic.co/t/painless-script-too-long/246043 "2020-08-24T01:36:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wfeng888](https://avatars.discourse-cdn.com/v4/letter/w/9de053/32.png) [@wfeng888](https://discuss.elastic.co/u/wfeng888)\
**Post date:** [August 24, 2020, 1:36am UTC](https://discuss.elastic.co/t/painless-script-too-long/246043/1 "2020-08-24T01:36:58Z")

</div>

When i use painless script, i get the following error:

 ![3078851a8fa7605ed37edc7d78e10fb7](https://us1.discourse-cdn.com/elastic/original/3X/2/b/2bc85c768f2343a944ec019811d3eeae828e7c55.jpeg)

Does this "plugin" mean the elasticsearch built-in aggregation function or something else?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 24, 2020, 2:21pm UTC](https://discuss.elastic.co/t/painless-script-too-long/246043/2 "2020-08-24T14:21:41Z")

</div>

Please don't post images of text as they are hard to read, may not display correctly for everyone, and are not searchable.

Instead, paste the text and format it with `</>` icon or pairs of triple backticks (```), and check the preview window to make sure it's properly formatted before posting it. This makes it more likely that your question will receive a useful answer.

Anyway the message means here that you need to write your own plugin (java code) in that case.

It would be great if you could update your post to solve this.

---

<div class="post-metadata">

**Author:** ![wfeng888](https://avatars.discourse-cdn.com/v4/letter/w/9de053/32.png) [@wfeng888](https://discuss.elastic.co/u/wfeng888)\
**Post date:** [August 24, 2020, 3:46pm UTC](https://discuss.elastic.co/t/painless-script-too-long/246043/3 "2020-08-24T15:46:15Z")

</div>

Sorry for this, I might be a little edgy. It was more important for me to achieve my business quickly, so i solved it by another way. I will if i have the time. Than you, thank you very much.

 ![43944D6842C1456DA7B2A14E933B50C6.png](https://us1.discourse-cdn.com/elastic/original/3X/6/7/677f06bdf711468707faf594c72c7993f90d2513.png)

---

<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:** [September 21, 2020, 3:46pm UTC](https://discuss.elastic.co/t/painless-script-too-long/246043/4 "2020-09-21T15:46:15Z")

</div>

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