Issue
Synonym rules created in the Rules UI are applied to queries across multiple collections.
Updates made in the Solr synonyms.txt file are not visible in the Rules UI, or changes in one area do not behave as expected in another.
Environment
Fusion 4.x or 5.x
Managed Fusion (Lucidworks-hosted)
Cause
Fusion provides two different mechanisms for handling synonyms:
Query Rewrite Rules (managed in the Rules UI)
Solr config set file synonyms.txt
These mechanisms are independent and serve different purposes.
Synonyms created in the Rules UI:
Are managed at the Fusion app level.
Apply to any query that uses a query pipeline containing a Text Tagger stage.
Do not support collection-level scoping.
Do not support labels or conditional targeting by collection name.
The Rules UI does not provide a way to restrict synonym rules to a specific Solr collection within the same Fusion app.
The synonyms.txt file:
Is part of the Solr config set.
Applies at the Solr collection level.
Is not automatically synchronized with the Rules UI.
Requires Solr to reload or restart to apply changes.
There is no automatic round-trip synchronization between Rules UI synonyms and synonyms.txt in standard configurations.
Resolution
Understand the difference between synonym management methods
Before implementing changes, determine which behavior is required:
Use Rules UI synonyms when dynamic, application-wide rewrites are acceptable.
Use synonyms.txt when collection-level control is required.
These approaches should not be treated as interchangeable.
Confirm how synonyms are applied in the query pipeline
Review the query pipeline configuration:
Navigate to Query Pipelines in Fusion.
Inspect the stages in use.
Locate the Text Tagger stage.
Verify whether a specific collection is defined.
If no collection is specified in the Text Tagger stage, the synonym rules apply across all collections that use that pipeline.
Apply application-wide synonyms using the Rules UI
To manage global synonyms:
Navigate to Rules.
Open Relevance Strategies.
Select Synonyms.
Create or edit synonym rules.
Publish the changes.
These rules will apply to all queries processed by pipelines that include the relevant Text Tagger stage within that Fusion app.
This approach is recommended for:
Broad, cross-service synonyms.
Frequently changing synonym lists.
Business-managed rewrite logic.
Apply collection-specific synonyms using synonyms.txt
To scope synonyms to a specific Solr collection:
Update the synonyms.txt file within the collection’s config set.
Reload or restart the Solr cores to apply changes. If using the Fusion Admin UI to update the synonyms.txt file, the reload will be done automatically.
This method ensures that synonyms apply only to the targeted collection.
This approach is recommended for:
Service-specific synonym requirements.
Collection-level isolation.
Environments requiring strict separation between brands or services.
Separate synonyms by using multiple Fusion apps
If different services require distinct rule sets and dynamic management via the Rules UI:
Create separate Fusion apps.
Assign collections and pipelines appropriately within each app.
Manage synonyms independently in each app’s Rules UI.
This provides logical isolation at the application level and prevents cross-application synonym leakage.
Choose the appropriate strategy
Use the following guidance:
If synonyms must apply globally across multiple collections, use the Rules UI.
If synonyms must differ by collection, use synonyms.txt or separate Fusion apps.
Do not rely on the Rules UI to conditionally scope synonyms by collection, as this capability is not supported.
By selecting the appropriate mechanism and aligning it with the desired scope, synonym behavior can be controlled predictably across collections and services.