# Why elasticsearch used different languages like painless and groovy in different cases?

**URL:** https://discuss.elastic.co/t/why-elasticsearch-used-different-languages-like-painless-and-groovy-in-different-cases/123150
**Category:** Elasticsearch
**Created:** [March 8, 2018, 10:22pm UTC](https://discuss.elastic.co/t/why-elasticsearch-used-different-languages-like-painless-and-groovy-in-different-cases/123150 "2018-03-08T22:22:56Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![saikrishnagaddipati](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@saikrishnagaddipati](https://discuss.elastic.co/u/saikrishnagaddipati)
#### Post date: [March 8, 2018, 10:22pm UTC](https://discuss.elastic.co/t/why-elasticsearch-used-different-languages-like-painless-and-groovy-in-different-cases/123150/1 "2018-03-08T22:22:56Z")

</div>

As we know Scripting is supported in many APIs. Can someone explain me at which scenario we should use groovy and which scenario we should use painless or other scripting languages?

I was going through the elastic documentation and it says to use groovy in this link

> [Partial Updates to Documents | Elasticsearch: The Definitive Guide [2.x] | Elastic](https://www.elastic.co/guide/en/elasticsearch/guide/current/partial-updates.html)

and in other places of the documentation i find documentation referring to painless scripting.

I was trying to see if i can use single language in my whole elastic environment?

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [March 8, 2018, 10:36pm UTC](https://discuss.elastic.co/t/why-elasticsearch-used-different-languages-like-painless-and-groovy-in-different-cases/123150/2 "2018-03-08T22:36:49Z")

</div>

As the use of Groovy within Elasticsearch is being deprecated, you should always use Painless.

---

<div class="post-metadata">

### Author: ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)
#### Post date: [March 9, 2018, 5:54am UTC](https://discuss.elastic.co/t/why-elasticsearch-used-different-languages-like-painless-and-groovy-in-different-cases/123150/3 "2018-03-09T05:54:45Z")

</div>

Groovy isn't just deprecated, it was completely removed in 6.0.

---

<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 6, 2018, 5:55am UTC](https://discuss.elastic.co/t/why-elasticsearch-used-different-languages-like-painless-and-groovy-in-different-cases/123150/4 "2018-04-06T05:55:03Z")

</div>

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