You'll have to contact Lucid's support for questions about their code. (I've been away from that code too long to recall much about it.)

-- Jack Krupansky

-----Original Message----- From: Miller, Will Jr
Sent: Friday, March 22, 2013 7:07 PM
To: solr-user@lucene.apache.org
Subject: Boost query parameter with Lucid parser and using query FunctionQuery

I have been playing around with the bq/bf/boost query parameters available in dismax/edismax. I am using the Lucid parser as my default parser for the query. The lucid parser is an extension of the DisMax parser and should contain everything that is available in that parser. My goal is boost items that have the word treatment in the title field. I started with the bq parameter and this works but it is an additive boost. I would prefer a multiplicative boost so I started to look at using boost which is part of edismax.

This is my full query:
/lucid?q=cancer&sort=score+desc&fl=title,score&wt=xml&indent=true&debugQuery=true&boost=product(10,query({!dismax qf="title" v="treatment"},0))
What I see in the debug data:

<str name="parsedquery">BoostedQuery(boost((abstract:blood | author:blood | origtitle:blood | substance:blood | text_all:blood | title:blood^5.0)~0.01,product(const(10),query(+(title:treatment) (abstract:treatment | author:treatment | substance:treatment | title:treatment^5.0 | text_all:treatment | origtitle:treatment),def=0.0))))</str> <str name="parsedquery_toString">boost((abstract:blood | author:blood | origtitle:blood | substance:blood | text_all:blood | title:blood^5.0)~0.01,product(const(10),query(+(title:treatment) (abstract:treatment | author:treatment | substance:treatment | title:treatment^5.0 | text_all:treatment | origtitle:treatment),def=0.0)))</str>

In the boost query I am specifying the field as title but it is expanding to look in all of the fields.

How do I restrict the boost query to just look in the title field?

Thanks,
Will

Reply via email to