Issue
Business rules are not triggering based on the original user query terms when synonyms are configured. Instead, rules only apply if the rewritten query terms (from the synonym mapping) match the rule condition. This can lead to unexpected behavior when rule conditions do not align with the user's original query phrasing.
Diagnosis
If a business rule does not trigger for a query term that has a synonym mapping configured, confirm whether the rule condition is written to match the post-synonym rewrite output rather than the original query.
For example, if a synonym mapping expands a single term to a multi-term phrase, a rule targeting the original term will not match unless it corresponds to the expanded form used in the rewritten query.
Environment
Fusion 5
Cause
This behavior is working as designed. Fusion's query pipeline applies synonym rewrites before evaluating business rules. As a result, the business rule logic operates on the rewritten query, not the original user input (orig_q).
Resolution
To ensure that business rules trigger as expected when synonym rewrites are used, write rule conditions to match the rewritten query output. For synonym mappings that expand terms (e.g., "ent" → "ear nose throat"), rules must reflect the expanded structure using appropriate boolean logic.
For example, if the synonym mapping is:
ent => ear nose throat
Then the corresponding rule condition must match the rewritten structure:
(ear AND nose AND throat)
((family AND medicine) (internal AND medicine))
To simplify rule creation and avoid ambiguity:
-
Review the rewritten query output by inspecting the query pipeline debug logs.
-
Align business rule conditions with the actual structure of the post-synonym query.
-
Consider restructuring synonym mappings if rule alignment becomes complex.