开发者

Ordering Solr search result by day/week/month/year views

Have Video mod开发者_开发技巧el and search index for it. Django-haystack and Solr are used. It is needed to sort result by video's views for day/week/month/year. Is it possible to this without always updating of search index by information of views for last day/week/month/year?

If need only sort by view for day and total, then it can be possible update index only for videos viewed for one day, which have current views equal 0.

Using update_index every few hours looks like not good idea, because now it takes 30 min so in future can take much more. Now search index is update only for changed objects with Celery asynchronous task.


You might want to take a look at ExternalFileField.

See also http://sujitpal.blogspot.com/2011/05/custom-sorting-in-solr-using-external.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜