<?php
$dismaxQuery = new SolrDisMaxQuery("lucene");
$dismaxQuery
->addBoostQuery('cat', 'clothing', 2)
->addBoostQuery('cat', 'electronics', 5.1)
;
echo $dismaxQuery.PHP_EOL;
?>
The above example will output
something similar to:
q=lucene&defType=edismax&bq=cat:clothing^2 cat:electronics^5.1