<?php
$dismaxQuery = new SolrDisMaxQuery('lucene');
$dismaxQuery
->addTrigramPhraseField('cat', 2, 5.1)
->addTrigramPhraseField('feature', 4.5)
;
echo $dismaxQuery.PHP_EOL;
?>
The above example will output:
q=lucene&defType=%s&pf3=cat~5.1^2 feature^4.5