# How to decay documents 1 year and 1+ year olders

**URL:** <https://discuss.elastic.co/t/how-to-decay-documents-1-year-and-1-year-olders/47121>\
**Category:** Elasticsearch\
**Created:** [April 12, 2016, 1:41pm UTC](https://discuss.elastic.co/t/how-to-decay-documents-1-year-and-1-year-olders/47121 "2016-04-12T13:41:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![batmaci](https://avatars.discourse-cdn.com/v4/letter/b/f08c70/32.png) [@batmaci](https://discuss.elastic.co/u/batmaci)\
**Post date:** [April 12, 2016, 1:41pm UTC](https://discuss.elastic.co/t/how-to-decay-documents-1-year-and-1-year-olders/47121/1 "2016-04-12T13:41:34Z")

</div>

accroding to the documentation

```
   "gauss": {
        "date": {
              "origin": "2013-09-17", 
              "scale": "10d",
              "offset": "5d", 
              "decay" : 0.5 
        }
    }

```

this query will do it as documents with a field value between 2013-09-12 and 2013-09-22 would get a weight of 1.0 and documents which are 15 days from that date a weight of 0.5.

I try to achieve similar but i cant figure out how to weight documents 1 year older than today gets 1.0 and older than 1 year gets 0.5?

---

<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 5, 2017, 11:00pm UTC](https://discuss.elastic.co/t/how-to-decay-documents-1-year-and-1-year-olders/47121/2 "2017-07-05T23:00:08Z")

</div>

Closed on July 5, 2017, 11:00pm UTC


