Autocomplete - heavily updated elasticsearch fields

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.



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
To view this discussion on the web visit
For more options, visit