* @license http://github.com/basdenooijer/solarium/raw/master/COPYING * @link http://www.solarium-project.org/ * * @package Solarium * @subpackage Client */ /** * Add select component distributedsearch to the request * * @package Solarium * @subpackage Client */ class Solarium_Client_RequestBuilder_Select_Component_DistributedSearch { /** * Add request settings for DistributedSearch * * @param Solarium_Query_Select_Component_DistributedSearch $component * @param Solarium_Client_Request $request * @return Solarium_Client_Request */ public function buildComponent($component, $request) { // add shard fields to request $shards = array_values($component->getShards()); if (count($shards)) { $request->addParam('shards', implode(',', $shards)); } $request->addParam('shards.qt', $component->getShardRequestHandler()); return $request; } }