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 "Van Tassell, Kristian" <kr...@siemens.com> on 2013/03/11 14:31:58 UTC
Boosting based on filter query
I want to be able to boost results where the filetype is a pdf:
Here is some pseudo code so I don't misrepresent/misinterpret via a URL:
search("foobar")
foreach result (where filetype==pdf) {
boost^10
}
Is there a way to do this?
Thanks in advance!
RE: Boosting based on filter query
Posted by "Van Tassell, Kristian" <kr...@siemens.com>.
Thank you!
-----Original Message-----
From: Erik Hatcher [mailto:erik.hatcher@gmail.com]
Sent: Monday, March 11, 2013 8:50 AM
To: solr-user@lucene.apache.org
Subject: Re: Boosting based on filter query
Definitely can do this, but how depends on the query parser you're using. With dismax/edismax you can use bq=filetype:pdf^10 (where "filetype:pdf" is a valid Lucene query parser expression for your documents).
Erik
On Mar 11, 2013, at 09:31 , Van Tassell, Kristian wrote:
> I want to be able to boost results where the filetype is a pdf:
>
> Here is some pseudo code so I don't misrepresent/misinterpret via a URL:
>
> search("foobar")
> foreach result (where filetype==pdf) {
> boost^10
> }
>
> Is there a way to do this?
>
> Thanks in advance!
>
Re: Boosting based on filter query
Posted by Erik Hatcher <er...@gmail.com>.
Definitely can do this, but how depends on the query parser you're using. With dismax/edismax you can use bq=filetype:pdf^10 (where "filetype:pdf" is a valid Lucene query parser expression for your documents).
Erik
On Mar 11, 2013, at 09:31 , Van Tassell, Kristian wrote:
> I want to be able to boost results where the filetype is a pdf:
>
> Here is some pseudo code so I don't misrepresent/misinterpret via a URL:
>
> search("foobar")
> foreach result (where filetype==pdf) {
> boost^10
> }
>
> Is there a way to do this?
>
> Thanks in advance!
>