if your goal is to say documents from certain categories should score 
higher then documents from other categories, regardless of what the query 
is, then you should review...

http://wiki.apache.org/solr/SolrRelevancyFAQ#How_can_I_increase_the_score_for_specific_documents
http://wiki.apache.org/solr/SolrRelevancyFAQ#How_can_I_change_the_score_of_a_document_based_on_the_.2Avalue.2A_of_a_field_.28say.2C_.22popularity.22.29

...and pick a number for each category that you use at index time (either 
as the docBoost or put in a numeric field that you use in functions)

if your goal is to say i want $current_category to be a factor in 
scoring, so that documents in $current_category score higher, but 
$current_category will change depending on the users action, then just 
incorporate "category:$current_category" into your query -- either as an 
optional clause in a lucene formated query, or using the bq or boost 
params on a dismax/edismax query.

: i've a table with products and their proper categories. Is it possible to
: weight categories, so that a user that searches for "apple ipad" don't get a
: magazine about apple ipad at the first result but the "hardware" apple ipad?
: I'm using DHI for indexing data, but don't know if there is any post-process
: to weight the categories I have.


-Hoss

Reply via email to