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 Romi <ro...@gmail.com> on 2011/07/04 13:11:11 UTC

configure dismax requesthandlar for boost a field

I want to apply boost for searching. i want that if a query term occur both
in description,name than docs having query term in description field come
high in search results. for this i configure dismax request handler as:

*<requestHandler name="dismax" class="solr.DisMaxRequestHandler"
default="true"  >
        <lst name="defaults">
         <str name="echoParams">explicit</str>
         <float name="tie">0.01</float>
         <str name="qf">
            text^0.5 name^1.0 description^1.5 
         </str>
        <str name="fl">
            UID_PK,name,price,description
         </str>
         <str name="mm">
            2&lt;-1 5&lt;-2 6&lt;90%
         </str>
         <int name="ps">100</int>
         <str name="q.alt">*:*</str>
        <str name="f.name.hl.fragsize">0</str>
        <str name="f.name.hl.alternateField">name</str>
         <str name="f.text.hl.fragmenter">regex</str> 
        </lst>
      </requestHandler>*

But i am not finding any effect in my search results. do i need to do some
more configuration to see the effect.





-----
Thanks & Regards
Romi
--
View this message in context: http://lucene.472066.n3.nabble.com/configure-dismax-requesthandlar-for-boost-a-field-tp3137239p3137239.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: configure dismax requesthandlar for boost a field

Posted by Chris Hostetter <ho...@fucit.org>.
: But i am not finding any effect in my search results. do i need to do some
: more configuration to see the effect.

posting the solrcofing.xml section for your dismax handler is helpful,
start, but to provide any meaninful assistance to you we need a lot more 
info then just that...

 * an example of hte URL you are using so we can see what params you are 
sending at query time

 * the scores & ids of docs that you don't feel are being returned in the 
order you think they should

 * the score explanation output for those docs using debugQuery=true (and 
if needed: explainother) so we can see what kinds of scores are being 
computed for various docs and why and help you understand that same output 
to make any changes as needed..



 


-Hoss

Re: configure dismax requesthandlar for boost a field

Posted by Ahmet Arslan <io...@yahoo.com>.
> I got the point that to boost search
> result i have to sort by score.
> But as in solrconfig for dismax request handler i use 
> 
> *<str name="qf">
>         text^0.5 name^1.0
> description^1.5 
>  </str>*
> 
> 
> because i want docs having querystring in description field
> come upper in
> search results.
> but what i am getting is first doc in search result which
> does not have
> querystring in its description field.

Increase the boost factor of description till you get. Lets say make it 100. Adding &debugQuery=on will show how the actual score is calculated.

Re: configure dismax requesthandlar for boost a field

Posted by Romi <ro...@gmail.com>.
I got the point that to boost search result i have to sort by score.
But as in solrconfig for dismax request handler i use  
*<str name="qf">
        text^0.5 name^1.0 description^1.5 
 </str>*


because i want docs having querystring in description field come upper in
search results.
but what i am getting is first doc in search result which does not have
querystring in its description field.


-----
Thanks & Regards
Romi
--
View this message in context: http://lucene.472066.n3.nabble.com/configure-dismax-requesthandlar-for-boost-a-field-tp3137239p3140501.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: configure dismax requesthandlar for boost a field

Posted by Marian Steinbach <ma...@sendung.de>.
On Tue, Jul 5, 2011 at 08:46, Romi <ro...@gmail.com> wrote:
> will merely adding fl=score make difference in search results, i mean will i
> get desired results now???

The fl parameter stands for "field list" and allows you to configure
in a request which result fields should be returned.

If you try to tweak the boosts in order to change your result order,
it's wise to add the calculated "score" to the output by setting
something like fl=score,*.

This reminds me of another important question: Are you sorting the
result by score? Because if not, your changes to the boosts/score
won't ever have an effect on the ordering.

http://wiki.apache.org/solr/CommonQueryParameters

Marian

Re: configure dismax requesthandlar for boost a field

Posted by Romi <ro...@gmail.com>.
will merely adding fl=score make difference in search results, i mean will i
get desired results now???

-----
Thanks & Regards
Romi
--
View this message in context: http://lucene.472066.n3.nabble.com/configure-dismax-requesthandlar-for-boost-a-field-tp3137239p3139814.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: configure dismax requesthandlar for boost a field

Posted by Bill Bell <bi...@gmail.com>.
Add score to the fl parameter.

fl=*,score


On 7/4/11 11:09 PM, "Romi" <ro...@gmail.com> wrote:

>I am not returning score for the queries. as i suppose it should be
>reflected
>in search results. means doc having query string in description field come
>higher than the doc having query string in name field.
>
>And yes i restarted solr after making changes in configuration.
>
>-----
>Thanks & Regards
>Romi
>--
>View this message in context:
>http://lucene.472066.n3.nabble.com/configure-dismax-requesthandlar-for-boo
>st-a-field-tp3137239p3139680.html
>Sent from the Solr - User mailing list archive at Nabble.com.



Re: configure dismax requesthandlar for boost a field

Posted by Romi <ro...@gmail.com>.
I am not returning score for the queries. as i suppose it should be reflected
in search results. means doc having query string in description field come
higher than the doc having query string in name field.

And yes i restarted solr after making changes in configuration.

-----
Thanks & Regards
Romi
--
View this message in context: http://lucene.472066.n3.nabble.com/configure-dismax-requesthandlar-for-boost-a-field-tp3137239p3139680.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: configure dismax requesthandlar for boost a field

Posted by Marian Steinbach <ma...@sendung.de>.
On Mon, Jul 4, 2011 at 13:11, Romi <ro...@gmail.com> wrote:
> I want to apply boost for searching. i want that if a query term occur both
> in description,name than docs having query term in description field come
> high in search results. for this i configure dismax request handler as:
>
> *<requestHandler name="dismax" class="solr.DisMaxRequestHandler"
> default="true"  >
>        <lst name="defaults">
>         <str name="echoParams">explicit</str>
>         <float name="tie">0.01</float>
>         <str name="qf">
>            text^0.5 name^1.0 description^1.5
>         </str>
>        <str name="fl">
>            UID_PK,name,price,description
>         </str>
>         <str name="mm">
>            2&lt;-1 5&lt;-2 6&lt;90%
>         </str>
>         <int name="ps">100</int>
>         <str name="q.alt">*:*</str>
>        <str name="f.name.hl.fragsize">0</str>
>        <str name="f.name.hl.alternateField">name</str>
>         <str name="f.text.hl.fragmenter">regex</str>
>        </lst>
>      </requestHandler>*
>
> But i am not finding any effect in my search results. do i need to do some
> more configuration to see the effect.
>


Did you return the score for the queries?

Did you compare scores between trials with "description^1.5" and, for
example, "description^10.0"?

Did you restart Solr after changes to solrconfig.xml?

Marian