# Autocomplete - heavily updated elasticsearch fields

**URL:** <https://discuss.elastic.co/t/autocomplete-heavily-updated-elasticsearch-fields/15414>\
**Category:** Elasticsearch\
**Created:** [January 25, 2014, 8:02am UTC](https://discuss.elastic.co/t/autocomplete-heavily-updated-elasticsearch-fields/15414 "2014-01-25T08:02:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![emonik\_2](https://avatars.discourse-cdn.com/v4/letter/e/34f0e0/32.png) [@emonik\_2](https://discuss.elastic.co/u/emonik_2)\
**Post date:** [January 25, 2014, 8:02am UTC](https://discuss.elastic.co/t/autocomplete-heavily-updated-elasticsearch-fields/15414/1 "2014-01-25T08:02:53Z")

</div>

We are trying to implement an autocomplete functionality, the suggestions  
will be based on the popularity and freshness of the users' earlier  
submitted query.

Anyway we have put together a simple algorithm to calculate and override  
the final score of a given document , it's calculated using 2 fields, the  
first is "freshness" which holds a calculated timestamps, the second is  
"popularity" which is an integer that determines the popularity of a given  
query , so far there's no problem.

Our problem is that we need both of the above mentioned fields ( freshness  
& popularity) to be as up to date as possible to give precise scores, so  
the only solution we could think of was to re-index the whole index each 12  
hours or so, to update the popularity and freshness ( since freshness is  
time sensitive and related to the time , now, tomorrow ... ), but we don't  
believe it is a good idea when our index becomes huge after a while.

If someone has a better idea or could shed some light on how we might  
approach this in a better way, it would be really appreciated.

Thanks,

Abdou.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/3239b3ff-7ace-480d-af2f-020b0e2cd82a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3239b3ff-7ace-480d-af2f-020b0e2cd82a%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 6, 2017, 1:54am UTC](https://discuss.elastic.co/t/autocomplete-heavily-updated-elasticsearch-fields/15414/2 "2017-07-06T01:54:49Z")

</div>


