Another possible way to get this done is by assigning weights to field values 
(e.g. pubDate field should have N% weight and relevancy score should have 
100-N% weight) and using their weighted values along with Lucene-provided 
relevancy score to compute a weighted score.  I haven't tried this, it may or 
may not work, or it may produce similar results as the function I suggested 
below.

If you try this, it would be great to hear if this works.

Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch


----- Original Message ----
> From: Jack <[EMAIL PROTECTED]>
> To: solr-user@lucene.apache.org
> Sent: Tuesday, May 20, 2008 3:59:06 PM
> Subject: Re: the time factor
> 
> Hi Otis,
> 
> I tried this. It doesn't seem to solve my problem, though. I think
> it's best used to make small adjustment when relevance scores are
> similar. In my case, if I want to rank the most recent documents first
> (because it's about news), I have to use very large boost, which will
> end up getting the docs that are not so relevant to the top. I haven't
> been able to get desired results of showing only recent documents with
> decent relevance scores.
> 
> Ideally, I think it can be solved by doing a query for the past 24
> hours and keeping the docs with best relevance scores, then another
> query for the previous 24 hours ... but this really isn't very
> efficient. Maybe OK for news because I may need to serve for up to 7
> days. Still, 7 solr queries for a front-end query doesn't sound ideal.
> So I'm still in search for a better way ...
> 
> Thanks,
> Jack
> 
> On Tue, May 13, 2008 at 9:06 PM, Otis Gospodnetic
> wrote:
> > The answer is: function queries! :)
> > You can easily use function queries with DisMaxRequestHandler.  For 
> > example, 
> this is what you can add to the dismax config section in solrconfig.xml:
> >
> >    
> >        recip(rord(addDate),1,1000,1000)^2.5
> >    
> >
> > Assuming you have an addDate field, this will give fresher document some 
> boost.  Look for this on the Wiki, it's all there.
> >
> > Otis

Reply via email to