> I am trying to create a feature that
> allows search results to be displayed by
> this formula sum(weight1*text relevance score, weight2 *
> price). weight1 and
> weight2 are numeric values that can be changed to influence
> the search
> results.
> 
> I am sending the following query params to the Solr
> instance for searching.
> 
> q=red
> defType=dismax
> qf=10^name+2^price

Correct syntax of qf and pf is fieldName^boostFactor, i.e, 
qf=name^10 price^2

However your query is a word, so it won't match in price field. I assume price 
field is numeric. 

You can simulate sum(weight1*text relevance score, weight2 * price).
with bf parameter and FunctionQueries. 

q=red&defTypeedismax&qf=name&bf=product(price,w1/w2)

http://wiki.apache.org/solr/FunctionQuery
http://wiki.apache.org/solr/DisMaxQParserPlugin#bf_.28Boost_Functions.29

Reply via email to