- Issue created by @tallytarik
- π³πΏNew Zealand magunz
I confirming that: Renaming "querytime_synonyms" to "default" fix the problem
diff --git a/src/Event/SynonymsSubscriber.php b/src/Event/SynonymsSubscriber.php index 829bc4e..56e4713 100644 --- a/src/Event/SynonymsSubscriber.php +++ b/src/Event/SynonymsSubscriber.php @@ -26,7 +26,7 @@ class SynonymsSubscriber implements EventSubscriberInterface { 'lenient' => TRUE, 'synonyms' => array_map('trim', $synonyms), ]; - $settings['analysis']['analyzer']['querytime_synonyms'] = [ + $settings['analysis']['analyzer']['default'] = [ 'type' => 'custom', 'tokenizer' => 'standard', 'filter' => ['lowercase', 'asciifolding', 'synonyms'],
- π¦πΊAustralia mstrelan
The solution in #2 did not work for me, but what did work was to disable fuzziness on the server configuration. We may need to find a way to combine fuzziness with synonyms.
The other issue I found is that the
AlterSettingsEvent
is dispatched when the index is saved, not when the server is saved, yet the synonyms configuration is on the server. It might make more sense to move the synonyms to the index, but failing that we should probably update all indexes for a server when the server is updated. - π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
kim.pepper β made their first commit to this issueβs fork.
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
kim.pepper β changed the visibility of the branch 3.x to hidden.
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Yes, the
AlterSettingsEvent
should probably be calledAlterIndexSettingsEvent
.We don't currently have anything to specifically update the server settings.
- π¬π§United Kingdom rupertj Bristol, UK
The solution from #2 is working for me. I have to rebuild the index after changing the synonyms, but after that it works as expected.
- Status changed to Needs review
16 days ago 8:06pm 20 May 2025 -
kim.pepper β
committed 96c64730 on 3.x
Issue #3350757: Synonyms don't work because the analyzer isn't used
-
kim.pepper β
committed 96c64730 on 3.x
-
kim.pepper β
committed f59bc695 on 2.x
Issue #3350757: Synonyms don't work because the analyzer isn't used (...
-
kim.pepper β
committed f59bc695 on 2.x
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Manually tested and confirmed adding the synonyms filter to the default analyzer fixes this issue.
Committed to 2.x and 3.x. Thanks!
- π¦πΊAustralia acbramley
This is a pretty major breaking change for people using
querytime_synonyms
in custom code, it broke our integration as we're referring to that analyzer in frontend code. - π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Oops! Not sure how to best manage multiple analyzers.
- πΊπΈUnited States damienmckenna NH, USA
It might be worth reverting this change to avoid breaking backwards compatibility.
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
I created a follow-up issue to restore the orginal behavior. π Restore querytime_synonyms analyzer Active