Skip to content

Commit

Permalink
pass locale to lucene index in multi search context
Browse files Browse the repository at this point in the history
  • Loading branch information
solverat committed Feb 9, 2024
1 parent b885564 commit c09cc66
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Upgrade Notes

## 3.0.2
- [BUGFIX] Pass locale to lucene index in multi search context

## 3.0.1
- Fix ZendSearch Version Constraint

Expand Down
3 changes: 2 additions & 1 deletion src/OutputChannel/MultiSearchOutputChannel.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,15 @@ public function getResult(SearchContainerInterface $searchContainer): SearchCont

public function getMultiSearchResult(MultiSearchContainerInterface $multiSearchContainer): MultiSearchContainerInterface
{
$userLocale = $this->outputChannelContext->getRuntimeQueryProvider()->getUserLocale();
$indexProviderOptions = $this->outputChannelContext->getIndexProviderOptions();

foreach ($multiSearchContainer->getSearchContainer() as $searchContainer) {

$query = $searchContainer->getQuery();

$eventData = $this->eventDispatcher->dispatchAction('build_index', [
'index' => $this->storageBuilder->getLuceneIndex($indexProviderOptions, ConfigurationInterface::INDEX_BASE_STABLE)
'index' => $this->storageBuilder->getLuceneIndex($indexProviderOptions, ConfigurationInterface::INDEX_BASE_STABLE, $userLocale)
]);

/** @var Lucene\SearchIndexInterface $index */
Expand Down

0 comments on commit c09cc66

Please sign in to comment.