* @license http://github.com/basdenooijer/solarium/raw/master/COPYING * @link http://www.solarium-project.org/ * * @package Solarium * @subpackage Client */ /** * Add select component dismax to the request * * @package Solarium * @subpackage Client */ class Solarium_Client_RequestBuilder_Select_Component_DisMax { /** * Add request settings for Dismax * * @param Solarium_Query_Select_Component_Dismax $component * @param Solarium_Client_Request $request * @return Solarium_Client_Request */ public function buildComponent($component, $request) { // enable dismax $request->addParam('defType', $component->getQueryParser()); $request->addParam('q.alt', $component->getQueryAlternative()); $request->addParam('qf', $component->getQueryFields()); $request->addParam('mm', $component->getMinimumMatch()); $request->addParam('pf', $component->getPhraseFields()); $request->addParam('ps', $component->getPhraseSlop()); $request->addParam('qs', $component->getQueryPhraseSlop()); $request->addParam('tie', $component->getTie()); $request->addParam('bq', $component->getBoostQuery()); $request->addParam('bf', $component->getBoostFunctions()); return $request; } }