# In Scripted fields no option to select lucene expression language - kibana version 7.9

**URL:** <https://discuss.elastic.co/t/in-scripted-fields-no-option-to-select-lucene-expression-language-kibana-version-7-9/253528>\
**Category:** Kibana\
**Created:** [October 28, 2020, 8:31am UTC](https://discuss.elastic.co/t/in-scripted-fields-no-option-to-select-lucene-expression-language-kibana-version-7-9/253528 "2020-10-28T08:31:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pranusha119](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@Pranusha119](https://discuss.elastic.co/u/Pranusha119)\
**Post date:** [October 28, 2020, 8:31am UTC](https://discuss.elastic.co/t/in-scripted-fields-no-option-to-select-lucene-expression-language-kibana-version-7-9/253528/1 "2020-10-28T08:31:15Z")

</div>

![image](https://us1.discourse-cdn.com/elastic/original/3X/0/f/0f773f0a1b97cc48b58ba60860938af2822e7f3e.png)

---

<div class="post-metadata">

**Author:** ![lukeelmers](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukeelmers/32/35230_2.png) [@lukeelmers](https://discuss.elastic.co/u/lukeelmers)\
**Post date:** [October 29, 2020, 9:07pm UTC](https://discuss.elastic.co/t/in-scripted-fields-no-option-to-select-lucene-expression-language-kibana-version-7-9/253528/2 "2020-10-29T21:07:52Z")

</div>

As of `7.0`, Lucene expression-based scripted fields have been deprecated, and you can only create new scripted fields using Painless. We are doing this for consistency with Elasticsearch, which [removed support for Expression filters](https://github.com/elastic/elasticsearch/issues/26429).

If you have previously created Expression scripted fields, you can still use them in `7.x`, you just won't be able to edit or change them. Starting in `8.0` support will be removed entirely and folks will need to migrate existing scripted fields to Painless -- at that time we will also be removing the language selection dropdown to prevent confusion.

There are a bunch more details in this issue if you are curious: [https://github.com/elastic/kibana/issues/77669](https://github.com/elastic/kibana/issues/77669)

---

<div class="post-metadata">

**Author:** ![Pranusha119](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@Pranusha119](https://discuss.elastic.co/u/Pranusha119)\
**Post date:** [November 5, 2020, 11:02am UTC](https://discuss.elastic.co/t/in-scripted-fields-no-option-to-select-lucene-expression-language-kibana-version-7-9/253528/3 "2020-11-05T11:02:29Z")

</div>

Thanks @lukeelmers  
I know we can add numbers in a field using sum aggregation in visualization, but is there any way to add all numbers in a field using scripted fields (lang : painless, as we can't use expressions)

---

<div class="post-metadata">

**Author:** ![lukeelmers](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukeelmers/32/35230_2.png) [@lukeelmers](https://discuss.elastic.co/u/lukeelmers)\
**Post date:** [November 6, 2020, 10:19pm UTC](https://discuss.elastic.co/t/in-scripted-fields-no-option-to-select-lucene-expression-language-kibana-version-7-9/253528/4 "2020-11-06T22:19:56Z")

</div>

Unfortunately no, to perform an aggregation in the Kibana UI, you'd need to configure it with a visualization of some type.

A scripted field only has access to the individual document, so for example if you had multiple numbers in different fields of a document that you wanted to sum, you could do that...

```auto
{
  a: 1,
  b: 2,
  my_scripted_field: 3 // script: doc['a'].value + doc['b'].value
}

```

...but you won't be able to do a proper aggregation on all returned documents.

---

<div class="post-metadata">

**Author:** ![Pranusha119](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@Pranusha119](https://discuss.elastic.co/u/Pranusha119)\
**Post date:** [November 16, 2020, 5:41pm UTC](https://discuss.elastic.co/t/in-scripted-fields-no-option-to-select-lucene-expression-language-kibana-version-7-9/253528/5 "2020-11-16T17:41:38Z")

</div>

Okay, thanks @lukeelmers

---

<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:** [December 14, 2020, 5:41pm UTC](https://discuss.elastic.co/t/in-scripted-fields-no-option-to-select-lucene-expression-language-kibana-version-7-9/253528/6 "2020-12-14T17:41:49Z")

</div>

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