# How to Query scripted fields that are computed at query time

**URL:** https://discuss.elastic.co/t/how-to-query-scripted-fields-that-are-computed-at-query-time/216668
**Category:** Kibana
**Created:** [January 27, 2020, 1:58pm UTC](https://discuss.elastic.co/t/how-to-query-scripted-fields-that-are-computed-at-query-time/216668 "2020-01-27T13:58:30Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jeremy.perez](https://avatars.discourse-cdn.com/v4/letter/j/e19adc/32.png) [@jeremy.perez](https://discuss.elastic.co/u/jeremy.perez)
#### Post date: [January 27, 2020, 1:58pm UTC](https://discuss.elastic.co/t/how-to-query-scripted-fields-that-are-computed-at-query-time/216668/1 "2020-01-27T13:58:30Z")

</div>

I want to query the script\_fields that apears in the Request in a Visualization, I know this is computed in real time so I don’t know if it is possible, is there is any way I can achieve this approach ?

---

<div class="post-metadata">

### Author: ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)
#### Post date: [January 28, 2020, 2:28pm UTC](https://discuss.elastic.co/t/how-to-query-scripted-fields-that-are-computed-at-query-time/216668/2 "2020-01-28T14:28:46Z")

</div>

What exactly would you like to query? If you want to do some aggregation based on that, the visualization allow for this, so if you have a numeric scripted\_field a "Sum" metric on that field should work just fine. If you offer more details we can look into your problem more.

---

<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: [February 25, 2020, 2:28pm UTC](https://discuss.elastic.co/t/how-to-query-scripted-fields-that-are-computed-at-query-time/216668/3 "2020-02-25T14:28:49Z")

</div>

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