public function testGetDistributedSearch() { $spellcheck = $this->query->getDistributedSearch(); $this->assertEquals('Solarium\\QueryType\\Select\\Query\\Component\\DistributedSearch', get_class($spellcheck)); }
/** * Check configuration for shards and when found create Distributed Search * * @param \Solarium\QueryType\Select\Query\Query $query */ private function createQueryComponents(&$query) { // Shards if (count($this->templateVariableContainer->get('settings')['shards'])) { $distributedSearch = $query->getDistributedSearch(); foreach ($this->templateVariableContainer->get('settings')['shards'] as $name => $shard) { $distributedSearch->addShard($name, $shard); } } }