# How to avoid decay function from being recomputed at query time

**URL:** <https://discuss.elastic.co/t/how-to-avoid-decay-function-from-being-recomputed-at-query-time/96019>\
**Category:** Elasticsearch\
**Created:** [August 6, 2017, 1:27pm UTC](https://discuss.elastic.co/t/how-to-avoid-decay-function-from-being-recomputed-at-query-time/96019 "2017-08-06T13:27:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vvarma](https://avatars.discourse-cdn.com/v4/letter/v/c68b51/32.png) [@vvarma](https://discuss.elastic.co/u/vvarma)\
**Post date:** [August 6, 2017, 1:27pm UTC](https://discuss.elastic.co/t/how-to-avoid-decay-function-from-being-recomputed-at-query-time/96019/1 "2017-08-06T13:27:45Z")

</div>

Hi all,  
Is it possible to have a derived column mapping - a column which is a function of another column and time.  
A bit more detail - I use the decay (gauss) fns on my scorer . But it feels to me like this value is recomputed at query time. Is there any way

1. I could define a column which is a function of another column and time with a predefined refresh rate of sorts  
or
2. cache the computed column separately so that it need not be computed if its already computed.

New to ES, so please point out if theres something obvious i am missing.

---

<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:** [September 3, 2017, 1:28pm UTC](https://discuss.elastic.co/t/how-to-avoid-decay-function-from-being-recomputed-at-query-time/96019/2 "2017-09-03T13:28:07Z")

</div>

Closed on September 3, 2017, 1:28pm UTC

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