Skip to content

Commit

Permalink
[feature] add support for distributed search
Browse files Browse the repository at this point in the history
[bugfix] fix typo to actually hand over the query object to slots (signal 'indexActionBeforeSelect')
  • Loading branch information
cradeck committed Aug 22, 2023
1 parent a11f6e5 commit 978d77d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Classes/Service/SolrServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function getDefaultQuery(): array

try {
$this->timing['INDEX_BEFORE_BeforeSelect_SLOT'] = $this->timeTracker->getDifferenceToStarttime();
$this->signalSlotDispatcher->dispatch('Subugoe\Find\Controller\SearchController', 'indexActionBeforeSelect', array(&$this->$query, $this->requestArguments));
$this->signalSlotDispatcher->dispatch('Subugoe\Find\Controller\SearchController', 'indexActionBeforeSelect', array(&$this->query, $this->requestArguments));
$this->timing['INDEX_AFTER_BeforeSelect_SLOT'] = $this->timeTracker->getDifferenceToStarttime();

$resultSet = $this->connection->execute($this->query);
Expand Down Expand Up @@ -856,6 +856,13 @@ protected function createQuery(): void
$this->addTypoScriptFilters();
$this->addDefaultQueryOperator();

if(is_array($this->settings['shards']) && count($this->settings['shards'])) {
$distributedSearch = $this->query->getDistributedSearch();
foreach($this->settings['shards'] as $name => $shard) {
$distributedSearch->addShard($name, $shard);
}
}

$this->query->setOmitHeader($this->settings['omitHeader']);

$this->setConfigurationValue('solarium', $this->query);
Expand Down

0 comments on commit 978d77d

Please sign in to comment.