On 2022/03/29 02:25:51 gnandre wrote:

> I have a search interface that searches for videos. There is a filter there

> that can sort the results based on views for last hour, last day,

> last week, last month and last year. Is there a way to achieve this sorting

> without always needing to update the index? E.g. After each specific

> duration expires, all documents need to be indexed again for newly

> calculated values.This is too much indexing overload. (p.s I am doing

> atomic indexing for these fields already)

>



Hi, sorry i have misread your question.

As Walter Underwood has written, External fields are a good solution for this 
kind of requirement.

You can create different external fields for views_hour, views_daily, etc.

Performance is rather good, if the doc ids are correctly sorted (as described 
in the documentation).



https://solr.apache.org/guide/8_11/working-with-external-files-and-processes.html



To update the data, just update the external field files and perform a core 
reload.

No need to reindex the data...



Best regards



Andreas Moll

Reply via email to