lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Graham Stead" <>
Subject RE: Avoiding sort by date
Date Mon, 16 Oct 2006 13:49:19 GMT
Given that you want to score new documents higher (implicitly sorting them),
I wonder whether Solr's FunctionQuery (specifically ReciprocalFloatFunction
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


> -----Original Message-----
> From: [] On Behalf 
> Of Yonik Seeley
> Sent: Sunday, October 15, 2006 8:32 PM
> To:
> Subject: Re: Avoiding sort by date
> On 10/12/06, 
> <> 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
> Solr, the open-source Lucene 
> search server

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message