You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Erik Holstad <er...@gmail.com> on 2008/11/10 21:25:40 UTC
Boosting newer inserted items in search?
Hi!
When doing a search we want to have a have parameters that we set of how to
boost different
scores. for example we want to have the ability to boost newer items in some
case and in some not,
like a sliding scale from only time to only relevancy.
What is the best way of doing this, using Solrj?
Regards Erik
Re: Boosting newer inserted items in search?
Posted by Erik Holstad <er...@gmail.com>.
Thanks Yonik for the answer1
Will try to implement that, but I can't seem to find how to do that using
Solrj,
do I just add it to the Query field or how is it done?
Regards Erik
On Mon, Nov 10, 2008 at 2:59 PM, Yonik Seeley <yo...@apache.org> wrote:
> My gut tells me that multiplying a function of the date field with the
> full-text relevancy score will work better than adding a function of
> the date field.
> BoostedQuery can do this via BoostQParserPlugin
>
> http://lucene.apache.org/solr/api/org/apache/solr/search/BoostQParserPlugin.html
>
> And for the function, you could make it flatter or steeper depending
> on how much you wanted date to influence the score. Might try a recip
> function or a linear function on the ord of the date field. We don't
> yet have any functions that work on the actual date values.
>
> http://wiki.apache.org/solr/FunctionQuery
>
> -Yonik
>
> On Mon, Nov 10, 2008 at 3:25 PM, Erik Holstad <er...@gmail.com>
> wrote:
> > Hi!
> > When doing a search we want to have a have parameters that we set of how
> to
> > boost different
> > scores. for example we want to have the ability to boost newer items in
> some
> > case and in some not,
> > like a sliding scale from only time to only relevancy.
> >
> > What is the best way of doing this, using Solrj?
> >
> > Regards Erik
> >
>
Re: Boosting newer inserted items in search?
Posted by Yonik Seeley <yo...@apache.org>.
My gut tells me that multiplying a function of the date field with the
full-text relevancy score will work better than adding a function of
the date field.
BoostedQuery can do this via BoostQParserPlugin
http://lucene.apache.org/solr/api/org/apache/solr/search/BoostQParserPlugin.html
And for the function, you could make it flatter or steeper depending
on how much you wanted date to influence the score. Might try a recip
function or a linear function on the ord of the date field. We don't
yet have any functions that work on the actual date values.
http://wiki.apache.org/solr/FunctionQuery
-Yonik
On Mon, Nov 10, 2008 at 3:25 PM, Erik Holstad <er...@gmail.com> wrote:
> Hi!
> When doing a search we want to have a have parameters that we set of how to
> boost different
> scores. for example we want to have the ability to boost newer items in some
> case and in some not,
> like a sliding scale from only time to only relevancy.
>
> What is the best way of doing this, using Solrj?
>
> Regards Erik
>