This is the echo params... It looks like it ignores the qf in the FunctionQuery 
and instead takes the qf of the main query.

<lst name="params">
        <str name="spellcheck">true</str>
        <str name="facet">true</str>
        <str name="sort">score desc</str>
        <str name="facet.limit">11</str>
        <str name="q.alt">*:*</str>
        <str name="showFindSimilarLinks">true</str>
        <str name="f.body.hl.alternateField">body</str>
        <str name="hl">true</str>
        <str name="stopwords.enabled">true</str>
        <str name="feedback">false</str>
        <str name="echoParams">all</str>
        <str name="fl">title,score</str>
        <str name="f.body.hl.maxAlternateFieldLength">250</str>
        <arr name="role">
                <str>DEFAULT</str>      
                <str>DEFAULT</str>
        </arr>
        <arr name="facet.field">
                <str>author_display</str>
                <str>data_source_name</str>
                <str>keywords_display</str>
                <str>mimeType</str>
        </arr>
        <str 
name="synonyms.fields">abstract,body,comments,country,description,diseaseconcept,genesymbol,grant,institution,investigator,investigatoraffiliation,keywordheading,nlmjournalname,origtitle,otherabstract,personname,primaryauthor,protocolconcept,spaceflight,substance,text_all,title</str>
        <str name="auto-complete">true</str>
        <str name="likeDoc.fl">author,title</str>
        <str name="facet.mincount">1</str>
        <str name="feedback.emphasis">relevancy</str>
        <str name="qf">abstract author origtitle substance text_all 
title^5.0</str>
        <str 
name="hl.fl">abstract,author,authorfullname,authorlast,body,comments,country,diseaseconcept,genesymbol,grant,institution,investigator,investigatoraffiliation,keywordheading,nlmjournalname,origtitle,otherabstract,personname,primaryauthor,protocolconcept,substance,title</str>
        <str name="spellcheck.collate">true</str>
        <str name="spellcheck.onlyMorePopular">true</str>
        <str name="defType">lucid</str>
        <str name="pf">abstract substance author title^5.0 text_all 
origtitle</str>
        <str 
name="stopwords.fields">abstract,body,comments,country,description,diseaseconcept,genesymbol,grant,institution,investigator,investigatoraffiliation,keywordheading,keywords,nlmjournalname,origtitle,otherabstract,personname,primaryauthor,protocolconcept,spaceflight,substance,title</str>
        <str name="boost">product(10,query({!dismax qf="title" 
v="treatment"},0))</str>
        <str name="synonyms.enabled">true</str>
        <str name="debugQuery">true</str>
        <str name="indent">true</str>
        <str name="q">cancer</str>
        <str name="wt">xml</str>
</lst>

-----Original Message-----
From: Jan Høydahl [mailto:jan....@cominvent.com] 
Sent: Friday, March 22, 2013 8:07 PM
To: solr-user@lucene.apache.org
Subject: Re: Boost query parameter with Lucid parser and using query 
FunctionQuery

Why would you use dismax for the query() when you want to match a simple term 
to one field?

If you share &echoParams=all the answer may lie somewhere therein?

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com
Solr Training - www.solrtraining.com

23. mars 2013 kl. 00:07 skrev "Miller, Will Jr" <will.mil...@wolterskluwer.com>:

> 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&debu
> gQuery=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