# Timelion: Scripted fields not working for "split" when it's applied to different index patterns

**URL:** <https://discuss.elastic.co/t/timelion-scripted-fields-not-working-for-split-when-its-applied-to-different-index-patterns/137250>\
**Category:** Kibana\
**Tags:** timelion\
**Created:** [June 25, 2018, 12:20pm UTC](https://discuss.elastic.co/t/timelion-scripted-fields-not-working-for-split-when-its-applied-to-different-index-patterns/137250 "2018-06-25T12:20:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucas.alvarez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lucas.alvarez/32/33649_2.png) [@lucas.alvarez](https://discuss.elastic.co/u/lucas.alvarez)\
**Post date:** [June 25, 2018, 12:20pm UTC](https://discuss.elastic.co/t/timelion-scripted-fields-not-working-for-split-when-its-applied-to-different-index-patterns/137250/1 "2018-06-25T12:20:11Z")

</div>

Hello everybody!:  
The problem I'm experiencing is that apparently scripted fields cannot be aggregated within different patterns.  
I have 3 index patterns (that group indices of the same type of logs) that contain a field called "severity\_label".  
However, in one of them "severity\_label" is a scripted field whereas in the other 2 is just a normal field.

When I try to write a Timelion expression for splitting these 3 index patterns based on the field "severity\_label", I'm getting the aggregation but only for the first two, the ones where the field is not scripted.  
The one that contains "severity\_label" as a scripted field does not appear in the visualization.

This is the expression I'm using in Timelion:

`.es(index='index1-*, index2-*, index3-*', split=severity_label:5)`

I tried running the same expression only under the first two index patterns and it worked. I even tried running it only for the third index pattern (the one that has the scripted field) alone and it also worked.  
It fails when you combine index patterns of different types of indices where some of them have the field as scripted and the rest do not.

Are there any workarounds for this?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [June 25, 2018, 11:19pm UTC](https://discuss.elastic.co/t/timelion-scripted-fields-not-working-for-split-when-its-applied-to-different-index-patterns/137250/2 "2018-06-25T23:19:55Z")

</div>

There is no current workaround. Would you mind opening up an issue at [https://github.com/elastic/kibana/issues/new/choose](https://github.com/elastic/kibana/issues/new/choose)?

---

<div class="post-metadata">

**Author:** ![lucas.alvarez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lucas.alvarez/32/33649_2.png) [@lucas.alvarez](https://discuss.elastic.co/u/lucas.alvarez)\
**Post date:** [June 27, 2018, 1:58pm UTC](https://discuss.elastic.co/t/timelion-scripted-fields-not-working-for-split-when-its-applied-to-different-index-patterns/137250/3 "2018-06-27T13:58:23Z")

</div>

Hello Nathan, I have created the issue as you suggested. This is the link: [https://github.com/elastic/kibana/issues/20269](https://github.com/elastic/kibana/issues/20269)

Thank you!.

---

<div class="post-metadata">

**Author:** ![lucas.alvarez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lucas.alvarez/32/33649_2.png) [@lucas.alvarez](https://discuss.elastic.co/u/lucas.alvarez)\
**Post date:** [July 2, 2018, 2:53pm UTC](https://discuss.elastic.co/t/timelion-scripted-fields-not-working-for-split-when-its-applied-to-different-index-patterns/137250/4 "2018-07-02T14:53:27Z")

</div>

No clues on how this kind of functionality could be achieved?

Basically what I want to do is have a graph that will aggregate across different index patterns. The trick is that in some of them this field will be scripted (imagine that not every index pattern calls the field with the exact same string).

---

<div class="post-metadata">

**Author:** ![lucas.alvarez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lucas.alvarez/32/33649_2.png) [@lucas.alvarez](https://discuss.elastic.co/u/lucas.alvarez)\
**Post date:** [July 3, 2018, 2:07pm UTC](https://discuss.elastic.co/t/timelion-scripted-fields-not-working-for-split-when-its-applied-to-different-index-patterns/137250/5 "2018-07-03T14:07:13Z")

</div>

@Nathan_Reese , do you know if this is a Timelion limitation or an Elastic Search limitation?

---

<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 31, 2018, 2:07pm UTC](https://discuss.elastic.co/t/timelion-scripted-fields-not-working-for-split-when-its-applied-to-different-index-patterns/137250/6 "2018-07-31T14:07:18Z")

</div>

Closed on July 31, 2018, 2:07pm UTC

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