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 sivaprasad <si...@echidnainc.com> on 2013/07/30 09:43:45 UTC

Boost on specific fields

Hi,

I have indexed product information , the product name, no of reviews and 
has_image fields. For example, any two products has "laptop" in the product
name and the user issued "laptop" as the search query, both the products are
coming as part of search results. Here, I am applying boosting on the no of
reviews and the has_image(This will be "Y" Or "N") and I am expecting the
product which has no of reviews count is more and the has_image="Y" should
come first. But, in some of the cases ,  I am not getting what I am
expecting from the Solr.

Is it right way to boost no of reviews and has_image fields?

-Siva



--
View this message in context: http://lucene.472066.n3.nabble.com/Boost-on-specific-fields-tp4081224.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Boost on specific fields

Posted by Jack Krupansky <ja...@basetechnology.com>.
Can you point to a specific portion of your query that leads you to "expect" 
some particular document to score higher? Please keep in mind that Solr does 
not yet have the ability to read your mind - it simply does its best to 
follow your specific instructions.

Doing a keyword match on a field (has_image) will work fine to "filter" 
documents, but won't affect their score unless it is used in an "OR" manner 
as opposed to a simple "AND" filtering manner. IOW, if all matched documents 
must have this field set to 'Y', then it won't give any document a higher 
score relative to the other matched documents.

You mention wanting a higher count in a field to rank higher - the only way 
I know to do that is using a function query with the "boost" or "bf" 
parameter - what does your function query look like and how did you decide 
whether the boost should be additive or multiplicative?

-- Jack Krupansky

-----Original Message----- 
From: sivaprasad
Sent: Tuesday, July 30, 2013 3:43 AM
To: solr-user@lucene.apache.org
Subject: Boost on specific fields

Hi,

I have indexed product information , the product name, no of reviews and
has_image fields. For example, any two products has "laptop" in the product
name and the user issued "laptop" as the search query, both the products are
coming as part of search results. Here, I am applying boosting on the no of
reviews and the has_image(This will be "Y" Or "N") and I am expecting the
product which has no of reviews count is more and the has_image="Y" should
come first. But, in some of the cases ,  I am not getting what I am
expecting from the Solr.

Is it right way to boost no of reviews and has_image fields?

-Siva



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Boost-on-specific-fields-tp4081224.html
Sent from the Solr - User mailing list archive at Nabble.com. 


Re: Boost on specific fields

Posted by Chris Hostetter <ho...@fucit.org>.
: coming as part of search results. Here, I am applying boosting on the no of
: reviews and the has_image(This will be "Y" Or "N") and I am expecting the
: product which has no of reviews count is more and the has_image="Y" should
: come first. But, in some of the cases ,  I am not getting what I am
: expecting from the Solr.

*How* are you applying these boosts?  what do your query requests actually 
look like? what does the debug info for your requests show you?  what are 
the field types of these fields?  what *exactly* are you expecting, and 
how *exactly* does what you get differ from your expectations? etc...

https://wiki.apache.org/solr/UsingMailingLists#Information_useful_for_searching_problems

* Sample data that you you've indexed that you think should satisfy the 
  search that's behaving unexpectedly.
* What you do expect, and why.
* Sample requests with all query params if you're not getting the results 
  you expect, especially the output you get by adding 
  echoParams=all&debugQuery=on to the URL you fire at SOLR.
* The definitions from your schema file for the relevant fields, and the 
  requestHandler configuration from your solrconfig.xml
* Any log information that looks relevant.
* Other useful information you'd need if you were trying to diagnose this 
  problem if someone else had submitted it. 



-Hoss