Given that you want to score new documents higher (implicitly sorting them), I wonder whether Solr's FunctionQuery (specifically ReciprocalFloatFunction - http://incubator.apache.org/solr/docs/api/org/apache/solr/search/function/Re ciprocalFloatFunction.html) may also be helpful. It gives newer documents higher scores than older documents.
I believe ReciprocalFloatFunction uses the document order within the index to help accomplish this (see ReverseOrdFieldSource), so your code would have to index new documents after older ones. Usually this is not a problem. In your case, I'm not sure when it's better to use Sort or ReciprocalFloatFunction. Perhaps someone with more knowledge than I could advise? -Graham > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf > Of Yonik Seeley > Sent: Sunday, October 15, 2006 8:32 PM > To: java-user@lucene.apache.org > Subject: Re: Avoiding sort by date > > On 10/12/06, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: > > Does the Sort function create some kind of internal cache? > > Yes, it's called the FieldCache, and there is a cache with a > weak reference to the index reader as a key. As long as > there is a reference to the index reader (even after close() > has been called) the cache data will exist. > > -Yonik > http://incubator.apache.org/solr Solr, the open-source Lucene > search server --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]