Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

SOLR Search Synonym

61 sites No security coverage
View on drupal.org

This module extends the functionality of Search API Synonym to integrate directly with Apache Solr. It allows you to export synonyms straight into your Solr configuration, eliminating the need to manually edit synonym files.

INTRODUCTION

This module is a extended version of Search API Synonym(search_api_synonym) module. It provides integration with Apache Solr and export synonyms directly in solr configuration (no need to update synonyms_und.txt file).

REQUIREMENTS

NEW FEATURES AND CHANGES

Apache SOLR integration and export synonyms directly in solr was missing in Search API Synonym module so we have implemented this feature and provided compatibility for drupal 9 version and some minor updates.

INSTALLATION

Install as you would normally install a contributed drupal module. See: https://www.drupal.org/documentation/install/modules-themes/modules-8 for further information.

MANAGE SYNONYMS

After installation can you start managing your synonyms and spelling errors

at admin/config/search/solr-search-synonyms.

INSTRUCTIONS

Please view the project's README for detailed installation and working instructions.

EXPORT SYNONYMS

Export synonyms using the Drush command:

drush solr-search-synonym:export

drush ssolr-syn:export

drush ssolr-syn-ex

Examples

Export all english synonyms and spelling errors in the Solr format.

[COMMAND] --plugin=solr --langcode=en

For exporting synonyms directly into the solr -

Update SynonymGraphFilterFactory class setting with ManagedSynonymGraphFilterFactory with managed attribute in /solr/data/{index_name}/conf/schema_extra_types.xml file OR just use the POST Method, Screenshot attached for reference.

For Example -

  • Configure the SOLR backend server and index on admin/config/search/solr-search-api.
  • Update SynonymGraphFilterFactory with ManagedSynonymGraphFilterFactory for fieldType name="text_und" in /solr/data/{index_name}/conf/schema_extra_types.xml file OR just use the POST Method, Screenshot attached for reference. This configuration worked with 8.9.0 solr version. For other versions and field types, configuration may be differ.
  • Restart SOLR.
  • Execute below command - [COMMAND] --plugin=solr_uploader --langcode=en
  • Verify Synonyms with current site search.

For more details, please review README.txt file.

Cron

Export using Drupal cron is supported. See the settings in /admin/config/search/solr-search-synonyms/settings.

For exporting synonyms directly into the solr make sure to update schema_extra_types.xml file first and restart solr. then while cron executed, the synonyms will be exported succussfully in solr.

DEVELOPERS

The Solr Search Synonym module provides the following ways for developers to extend the functionality:

Plugins

Export plugin - see the annotation and the Solr plugin:

  • Drupal\solr_search_synonym\Annotation\SearchSearchSynonymExport
  • Drupal\solr_search_synonym\Plugin\solr_search_synonym\export\Solr
  • Drupal\solr_search_synonym\Plugin\solr_search_synonym\export\SolrUploader

MAINTAINERS

Current maintainers:

Activity

Total releases
6
First release
Jan 2025
Latest release
4 months ago
Releases (12 mo)
4 ▲ from 2
Maintenance
Active

Release Timeline

Releases

Version Type Release date
3.0.2 Stable Feb 27, 2026
2.0.8 Stable Feb 27, 2026
3.0.1 Stable Oct 15, 2025
2.0.7 Stable Oct 15, 2025
2.0.6 Stable Jun 18, 2025
2.0.5 Stable Jan 23, 2025