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 Andy <an...@yahoo.com> on 2010/01/03 23:39:34 UTC

Any way to modify result ranking using an integer field?

Is there any way to modify result ranking using an integer field?

I have documents that have an integer field "popularity".

I want to rank results by a combination of normal fulltext search 
 relevance and popularity. It's kinda like search in digg - result 
 ranking is based on the search relevance as well as how many digs a 
 posting has. 
 I don't have any specific ranking algorithm in mind. But is this 
 something that can be done with solr? 





      

Re: Any way to modify result ranking using an integer field?

Posted by Andy <an...@yahoo.com>.
What I meant was that is there any way to make  {!boost b=log(popularity)} the default query type so that every query will be using it. 
From: Andy <an...@yahoo.com>
Subject: Re: Any way to modify result ranking using an integer field?
To: solr-user@lucene.apache.org
Date: Monday, January 4, 2010, 1:08 AM

Thanks Ahmet.

Do I need to do anything to enable BoostQParserPlugin in Solr, or is it already enabled?



      

Re: Any way to modify result ranking using an integer field?

Posted by Andy <an...@yahoo.com>.
Right. But my understanding is that the handler default setting in solrconfig doesn't take the parameter {!boost}, it only takes the parameter bf, which adds the function query instead of multiply it.

Seems like the only way to have a default for parameter {!boost} is to use edismax, which won't be available till 1.5

--- On Thu, 1/7/10, Otis Gospodnetic <ot...@yahoo.com> wrote:

From: Otis Gospodnetic <ot...@yahoo.com>
Subject: Re: Any way to modify result ranking using an integer field?
To: solr-user@lucene.apache.org
Date: Thursday, January 7, 2010, 4:07 PM

Not sure if this was answered.
Yes, you can set the default params/values for a request handler in the solrconfig.xml .

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



----- Original Message ----
> From: Andy <an...@yahoo.com>
> To: solr-user@lucene.apache.org
> Sent: Mon, January 4, 2010 4:56:14 PM
> Subject: Re: Any way to modify result ranking using an integer field?
> 
> Thank you Ahmet.
> 
> Is there any way I can configure Solr to always use {!boost b=log(popularity)} 
> as the default for all queries?
> 
> I'm using Solr through django-haystack, so all the Solr queries are actually 
> generated by haystack. It'd be much cleaner if I could configure Solr to always 
> use BoostQParserPlugin for all queries instead of manually modifying every 
> single query generated by haystack.
> 
> --- On Mon, 1/4/10, Ahmet Arslan wrote:
> 
> From: Ahmet Arslan 
> Subject: Re: Any way to modify result ranking using an integer field?
> To: solr-user@lucene.apache.org
> Date: Monday, January 4, 2010, 2:33 PM
> 
> > Thanks Ahmet.
> > 
> > Do I need to do anything to enable BoostQParserPlugin in
> > Solr, or is it already enabled?
> 
> I just confirmed that it is already enabled. You can see affect of it by 
> appending &debugQuery=on to your search url.




      

Re: Any way to modify result ranking using an integer field?

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Not sure if this was answered.
Yes, you can set the default params/values for a request handler in the solrconfig.xml .

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



----- Original Message ----
> From: Andy <an...@yahoo.com>
> To: solr-user@lucene.apache.org
> Sent: Mon, January 4, 2010 4:56:14 PM
> Subject: Re: Any way to modify result ranking using an integer field?
> 
> Thank you Ahmet.
> 
> Is there any way I can configure Solr to always use {!boost b=log(popularity)} 
> as the default for all queries?
> 
> I'm using Solr through django-haystack, so all the Solr queries are actually 
> generated by haystack. It'd be much cleaner if I could configure Solr to always 
> use BoostQParserPlugin for all queries instead of manually modifying every 
> single query generated by haystack.
> 
> --- On Mon, 1/4/10, Ahmet Arslan wrote:
> 
> From: Ahmet Arslan 
> Subject: Re: Any way to modify result ranking using an integer field?
> To: solr-user@lucene.apache.org
> Date: Monday, January 4, 2010, 2:33 PM
> 
> > Thanks Ahmet.
> > 
> > Do I need to do anything to enable BoostQParserPlugin in
> > Solr, or is it already enabled?
> 
> I just confirmed that it is already enabled. You can see affect of it by 
> appending &debugQuery=on to your search url.


Re: Any way to modify result ranking using an integer field?

Posted by Andy <an...@yahoo.com>.
Thank you Ahmet.

Is there any way I can configure Solr to always use {!boost b=log(popularity)} as the default for all queries?

I'm using Solr through django-haystack, so all the Solr queries are actually generated by haystack. It'd be much cleaner if I could configure Solr to always use BoostQParserPlugin for all queries instead of manually modifying every single query generated by haystack.

--- On Mon, 1/4/10, Ahmet Arslan <io...@yahoo.com> wrote:

From: Ahmet Arslan <io...@yahoo.com>
Subject: Re: Any way to modify result ranking using an integer field?
To: solr-user@lucene.apache.org
Date: Monday, January 4, 2010, 2:33 PM

> Thanks Ahmet.
> 
> Do I need to do anything to enable BoostQParserPlugin in
> Solr, or is it already enabled?

I just confirmed that it is already enabled. You can see affect of it by appending &debugQuery=on to your search url.


      



      

Re: Any way to modify result ranking using an integer field?

Posted by Ahmet Arslan <io...@yahoo.com>.
> Thanks Ahmet.
> 
> Do I need to do anything to enable BoostQParserPlugin in
> Solr, or is it already enabled?

I just confirmed that it is already enabled. You can see affect of it by appending &debugQuery=on to your search url.


      

Re: Any way to modify result ranking using an integer field?

Posted by Andy <an...@yahoo.com>.
Thanks Ahmet.

Do I need to do anything to enable BoostQParserPlugin in Solr, or is it already enabled?

--- On Sun, 1/3/10, Ahmet Arslan <io...@yahoo.com> wrote:

From: Ahmet Arslan <io...@yahoo.com>
Subject: Re: Any way to modify result ranking using an integer field?
To: solr-user@lucene.apache.org
Date: Sunday, January 3, 2010, 5:45 PM


> Is there any way to modify result
> ranking using an integer field?
> 
> I have documents that have an integer field "popularity".
> 
> I want to rank results by a combination of normal fulltext
> search 
>  relevance and popularity. It's kinda like search in digg -
> result 
>  ranking is based on the search relevance as well as how
> many digs a 
>  posting has. 
>  I don't have any specific ranking algorithm in mind. But
> is this 
>  something that can be done with solr? 

Yes. http://lucene.apache.org/solr/api/org/apache/solr/search/BoostQParserPlugin.html






      

Re: Any way to modify result ranking using an integer field?

Posted by Ahmet Arslan <io...@yahoo.com>.
> Is there any way to modify result
> ranking using an integer field?
> 
> I have documents that have an integer field "popularity".
> 
> I want to rank results by a combination of normal fulltext
> search 
>  relevance and popularity. It's kinda like search in digg -
> result 
>  ranking is based on the search relevance as well as how
> many digs a 
>  posting has. 
>  I don't have any specific ranking algorithm in mind. But
> is this 
>  something that can be done with solr? 

Yes. http://lucene.apache.org/solr/api/org/apache/solr/search/BoostQParserPlugin.html