Thanks for your suggestion! I try to set document boost factor when indexing document. In order to bubble up recent documents' scores, I set last three month's documents' boost to 2 , and set other documents' boost factor to 0.5. The I search index sorting by two fields, lucene default score and time desc. The sorting results seem good. It meet my requirement.
On Mon, May 9, 2011 at 6:31 PM, Ian Lea <ian....@gmail.com> wrote: > Well, you can use one of the sorting search methods and pass multiple > sort keys including relevance and a timestamp. But I suspect the > Google algorithm may be a bit more complex than that. > > One technique is boosting: set an index time document boost on recent > documents. Of course what is recent today may not be next week. > There are other, more complex ways of customizing lucene scoring. A > Google search for something like "customized lucene scoring" will find > lots of info, some recent, some older, but probably all relevant one > way or another. > > > -- > Ian. > > > On Mon, May 9, 2011 at 4:59 AM, Johnbin Wang <johnbin.w...@gmail.com> > wrote: > > What do I want to do is just like Google search results. The results in > the > > first page is the most relevant and also recent documents, but not > > absolutely sorted by time desc. > > > > -- > > cheers, > > Johnbin Wang > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > > -- cheers, Johnbin Wang