* @license http://github.com/basdenooijer/solarium/raw/master/COPYING * @link http://www.solarium-project.org/ * * @package Solarium * @subpackage Client */ /** * Add select component Spellcheck to the request * * @package Solarium * @subpackage Client */ class Solarium_Client_RequestBuilder_Select_Component_Spellcheck { /** * Add request settings for Spellcheck * * @param Solarium_Query_Select_Component_Spellcheck $component * @param Solarium_Client_Request $request * @return Solarium_Client_Request */ public function buildComponent($component, $request) { // enable spellcheck $request->addParam('spellcheck', 'true'); $request->addParam('spellcheck.q', $component->getQuery()); $request->addParam('spellcheck.build', $component->getBuild()); $request->addParam('spellcheck.reload', $component->getReload()); $request->addParam('spellcheck.dictionary', $component->getDictionary()); $request->addParam('spellcheck.count', $component->getCount()); $request->addParam('spellcheck.onlyMorePopular', $component->getOnlyMorePopular()); $request->addParam('spellcheck.extendedResults', $component->getExtendedResults()); $request->addParam('spellcheck.collate', $component->getCollate()); $request->addParam('spellcheck.maxCollations', $component->getMaxCollations()); $request->addParam('spellcheck.maxCollationTries', $component->getMaxCollationTries()); $request->addParam('spellcheck.maxCollationEvaluations', $component->getMaxCollationEvaluations()); $request->addParam('spellcheck.collateExtendedResults', $component->getCollateExtendedResults()); $request->addParam('spellcheck.accuracy', $component->getAccuracy()); return $request; } }