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 bec2c3f commit 385ff29
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codeception.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Codeception
on:
push:
branches: [ 'master' ]
branches: [ '2.x' ]
pull_request:
branches: [ 'master' ]
branches: [ '2.x' ]

jobs:
codeception:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ecs.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Easy Coding Standards
on:
push:
branches: [ 'master' ]
branches: [ '2.x' ]
pull_request:
branches: [ 'master' ]
branches: [ '2.x' ]

jobs:
ecs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/php-stan.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: PHP Stan
on:
push:
branches: [ 'master' ]
branches: [ '2.x' ]
pull_request:
branches: [ 'master' ]
branches: [ '2.x' ]

jobs:
stan:
Expand Down
3 changes: 3 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Upgrade Notes

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

## 2.0.1
- [BUGFIX] SnowBallStemmingFilter uses not initialized locale [#15](https://github.com/dachcom-digital/pimcore-dynamic-search-index-provider-lucene/issues/15)
- [BUGFIX] basePath is scalar node, not boolean [@dpfaffenbauer](https://github.com/dachcom-digital/pimcore-dynamic-search-index-provider-lucene/pull/14)
Expand Down
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 385ff29

Please sign in to comment.