Use the edismax query parser with a higher boost for category than name:

   qf=name category^10.0

Tune the boost as needed for your app.

Make sure name and category have both "text" and "string" variants - use <copyField>. The string variant is good for facets, the text variant is good for keyword search. Use the text variant in qf.

-- Jack Krupansky

-----Original Message----- From: winsu
Sent: Friday, June 28, 2013 9:26 PM
To: solr-user@lucene.apache.org
Subject: increase search score of certain category only for certain keyword

Hi,

Currently i've certain sample data :
name : summer boot
category : boot shoe

name  : snow boot
category : boot shoe

name : boot pant
category : pants

name : modern boot pant
category : pants

name : modern bootcut
category : pants


If the keyword search "boot" , how to make the item with category "shoe" has
higher rank than "pants" ?

can we setting at Solr to tell solr for certain keyword we need to give
"boot shoe" higher rank than other category ?
Thx :)





--
View this message in context: http://lucene.472066.n3.nabble.com/increase-search-score-of-certain-category-only-for-certain-keyword-tp4074051.html Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to