# Finding good initial Elasticsearch decay parameters

**URL:** <https://discuss.elastic.co/t/finding-good-initial-elasticsearch-decay-parameters/34474>\
**Category:** Elasticsearch\
**Created:** [November 12, 2015, 11:18pm UTC](https://discuss.elastic.co/t/finding-good-initial-elasticsearch-decay-parameters/34474 "2015-11-12T23:18:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Quitta](https://avatars.discourse-cdn.com/v4/letter/q/c5a1d2/32.png) [@Quitta](https://discuss.elastic.co/u/Quitta)\
**Post date:** [November 12, 2015, 11:18pm UTC](https://discuss.elastic.co/t/finding-good-initial-elasticsearch-decay-parameters/34474/1 "2015-11-12T23:18:15Z")

</div>

I'm building a system that tries to optimize the finding of duplicate bug reports using ElasticSearch.

Aside the textual similarity I want to boost the score by using a decay function based on the time between the queried bug report and the documents (other bug reports).

I've already performed an initial analysis on my dataset and discovered that relevant bug reports seem to follow a particular time pattern related to there original bug report.

![](https://us1.discourse-cdn.com/elastic/original/2X/1/1e2ed4e4b5be1f7164184fe20ab47c607248ec1c.jpg)

This shows that bug reports that are posted closer together in time, have a higher chance of being a duplicate (relevant) than others.The graph above uses steps of 10 days.

However using steps of 1 day looks like the following:  
 ![](https://us1.discourse-cdn.com/elastic/original/2X/0/0d50781c31417afbc006800d5178093b2a6d63c6.jpg)  
With one large peak for the first day and it then becoming more linear. I'm however not sure if this is the correct curve to use and how I could use it to still leverage the importance of the first day.

In addition, I've read that decay functions need 4 parameters: Origin, offset, decay and scale. As origin I believe I must use the date of the queried bug report. However I'm wondering what the other parameters should be. I'm aware that this has to be found in an iterative way where one tries different settings, but I guess a good initial guess is important.

My questions are the following:

- What would be the best fitting curve for my scenario  
(gauss/linear/exp)?
- What would be a good initial parameter setting to  
test?
- What would be a good way to incorporate this addition into the  
score? I've read that multiplying it with the score would make this  
too heavy weighted, since this addition should only influence the score by a  
little.

Thank you.

---

<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:38pm UTC](https://discuss.elastic.co/t/finding-good-initial-elasticsearch-decay-parameters/34474/2 "2017-07-05T23:38:44Z")

</div>


