- Issue created by @charly71
- 🇮🇹Italy charly71
I tried this patch and it works:
diff --git a/modules/contrib/search_api_synonym/src/Plugin/search_api_synonym/export/Solr.php b/modules/contrib/search_api_synonym/src/Plugin/search_api_synonym/export/Solr.php index bf9ff4ed0..4b7a47279 100644 --- a/modules/contrib/search_api_synonym/src/Plugin/search_api_synonym/export/Solr.php +++ b/modules/contrib/search_api_synonym/src/Plugin/search_api_synonym/export/Solr.php @@ -57,10 +57,10 @@ private function generateLine($word, $synonyms, $type) { switch ($type) { case 'synonym': // We force using of equivalent mappings for type = synonym. - $line = "{$word}, {$synonyms}"; + $line = "{$synonyms}, {$word}"; break; case 'spelling_error': - $line = "{$word} => {$synonyms}"; + $line = "{$synonyms} => {$word}"; break; } return $line;
- 🇬🇧United Kingdom aaron.ferris
Agreed with this, I don't think we need to change the synonym case but the spelling error does need a switch I believe.
- Assigned to aaron.ferris
- 🇬🇧United Kingdom aaron.ferris
MR raised
# # Synonyms file for Apache Solr generated by Search API Synonym. # See file https://www.drupal.org/project/search_api_synonym. # marmalade,mermelad,marmellade => marmelade search => replace
- 🇧🇷Brazil brandonlira
Hi @aaron, I tested this and it's working as expected.
The export file correctly shows the spelling correction in the expected format:
marmalade,mermelad,marmellade => marmelade
Thanks for the fix, everything looks good!