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 deepak agrawal <dk...@gmail.com> on 2010/02/18 09:28:22 UTC

Query boosting

Hi,

i want to boost the result through query.
i have 4 fields in our schema.

<field name="UPDBY" type="text" indexed="true" stored="true"/>
<field name="TO" type="text" indexed="true" stored="true"/>
<field name="CC" type="text" indexed="true" stored="true"/>
<field name="BCC" type="text" indexed="true" stored="true"/>

If i search *deepak* then result should come in that order  -


All *UPDBY* having deepak then
All *To* having deepak then
All *CC* having deepak
All *BCC* having deepak

I am using Standard request handler. Please help me on this.
-- 
DEEPAK AGRAWAL
+91-9379433455
GOOD LUCK.....

Re: Query boosting

Posted by Chris Hostetter <ho...@fucit.org>.
: Try using the dismax handler
: http://wiki.apache.org/solr/DisMaxRequestHandler
: 
: This would be very good read for you.
: 
: you would use the bq ( boost query parameter) and it should look something
: similar to..
: 
: &bq=UPDBY:deepak^5.0+TO:deepak^4.0+CC:deepak^3.0+BCC:deepak^2.0

Uh... that doesn't really make much sense.  you could do the same thing 
using the standard QParser, the reason to use dismax is so you could 
express the boosting per field inddependent of the query string...

  q=deepak&qf=UPDBY^1000+TO^100+CC^10+BCC^1



-Hoss


Re: Query boosting

Posted by Paul Dhaliwal <su...@gmail.com>.
Try using the dismax handler
http://wiki.apache.org/solr/DisMaxRequestHandler

This would be very good read for you.

you would use the bq ( boost query parameter) and it should look something
similar to..

&bq=UPDBY:deepak^5.0+TO:deepak^4.0+CC:deepak^3.0+BCC:deepak^2.0

Paul

On Thu, Feb 18, 2010 at 12:28 AM, deepak agrawal <dk...@gmail.com> wrote:

> Hi,
>
> i want to boost the result through query.
> i have 4 fields in our schema.
>
> <field name="UPDBY" type="text" indexed="true" stored="true"/>
> <field name="TO" type="text" indexed="true" stored="true"/>
> <field name="CC" type="text" indexed="true" stored="true"/>
> <field name="BCC" type="text" indexed="true" stored="true"/>
>
> If i search *deepak* then result should come in that order  -
>
>
> All *UPDBY* having deepak then
> All *To* having deepak then
> All *CC* having deepak
> All *BCC* having deepak
>
> I am using Standard request handler. Please help me on this.
> --
> DEEPAK AGRAWAL
> +91-9379433455
> GOOD LUCK.....
>