# Script Painless with Timelion

**URL:** https://discuss.elastic.co/t/script-painless-with-timelion/253177
**Category:** Kibana
**Tags:** timelion
**Created:** [October 23, 2020, 8:31pm UTC](https://discuss.elastic.co/t/script-painless-with-timelion/253177 "2020-10-23T20:31:21Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Guilherme](https://avatars.discourse-cdn.com/v4/letter/g/77aa72/32.png) [@Guilherme](https://discuss.elastic.co/u/Guilherme)
#### Post date: [October 23, 2020, 8:31pm UTC](https://discuss.elastic.co/t/script-painless-with-timelion/253177/1 "2020-10-23T20:31:21Z")

</div>

Would it be possible to use any timelion or transformation script in the query? as the watcher does.

something like that idiot example:

> .es (q = '' "" script ": {  
> "source": "" "  
> def theDate = ...  
> "" ",  
> "lang": "painless"  
> } ", index = logstash- \*)

---

<div class="post-metadata">

### Author: ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)
#### Post date: [October 29, 2020, 7:28pm UTC](https://discuss.elastic.co/t/script-painless-with-timelion/253177/2 "2020-10-29T19:28:55Z")

</div>

I'm sorry but I don't understand your question. Where are you trying to use the query? In Discover? Timelion? A scripted field?

---

<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: [November 26, 2020, 7:29pm UTC](https://discuss.elastic.co/t/script-painless-with-timelion/253177/3 "2020-11-26T19:29:00Z")

</div>

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