I have an index of books in Solr. I copy all the fields to a field called
"text" and search on it i.e. in my schema.xml I have: 
                          <copyField source="*" dest="text"/>

Then in my solrconfig.xml (similar to the velocity example in
example\example-DIH\solr\db) I use the "edismax" parser and I have the
queryfield simply as: 
               <str name="qf">text</str>

So far my search works. However, I would like to know if there is a way to
boost certain results based on a match in a different field. 

In my case, I have another field called "category" which has the category
the book is under. I would like to have the search boost results if there is
a match in the "category" field. 
E.g. If I enter the search query as "religion", which should match the
category "religion" I would like books like the "bible", "quran", "vedas"
etc. which are in the religion category to be boosted and come at the top of
the list. Instead I see books on religious history and philosophy come at
the top. 

I understand that the search is doing what it is configured to do i.e.
"bible", "quran", "vedas" etc do not have the word/stem "religion" as
frequently as books on religious history and philosophy. My question is how
do I change the current search such that if there is a match in the
"category" field, the results from that category (religion in this case) get
boosted. For a search query "religion" the books in the "religion" category
should come before the books listed under "history".  

I'd be grateful if anyone can show me how to change my search to take the
"category" field into account.  Setting my queryfield like text^0.5 category
^3 does not seem to work.
Thank you in advance,
O. O.




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Boost-based-on-match-in-separate-field-tp4158346.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to