Issue
Why is the applicable_rules array empty in the Fusion query response, even though the query returned results?
Diagnosis
When a Fusion query is executed, the pipeline processes include rule evaluation steps such as redirects, facet adjustments, parameter settings, or block lists. If no rules match the incoming query, the response from Fusion will still return documents as long as the query is valid and returns results from Solr.
To determine whether a query rewrite rule has been applied, inspect the applicable_rules array in the Fusion JSON response.
Environment
Fusion 5.x and later
Applies to any environment using query pipelines with query rewriting enabled.
Cause
An empty applicable_rules array indicates that:
The query did not match any rewrite rule configured in the pipeline.
No rules were triggered based on keywords, filters, field values, or tag matches.
This does not indicate a failure; rather, it reflects the absence of applicable rules for the specific query input.
Resolution
Verify if any rewrite rule was applied
Inspect the query response JSON under the fusion.applicable_rules field.
If rules matched, this field contains an array of rule objects applied to the query.
If no rules matched, the array will be empty:
"applicable_rules": []This means no redirect, block list, facet, or parameter change was triggered during this query execution.
Confirm that rule evaluation is enabled
Ensure the query pipeline includes the Query Rewrite stage and that the pipeline in use has associated rules. You can verify this via:
The Fusion UI: Navigate to Query Pipelines > [Your Pipeline] > Query Rewrite
API: Check the pipeline’s configuration to confirm the rewrite stage is present and pointing to the correct rule set.
Test with known matching input
To validate that the pipeline is functioning correctly:
Submit a test query that is known to trigger a rule.
Inspect the
applicable_rulesarray in the response.Confirm that the expected rule object appears with metadata like
id,name,doc_type, andmatching.
If rules are triggered in this case but not for other queries, it confirms that the pipeline is functioning correctly, and the original query simply did not match any defined rule.
Additional considerations
Rules are matched based on configuration in the Query Rewrite stage. Matching types include:
keywordsfield valuestags
If you're unsure why a specific rule didn’t match, review the rule’s match conditions and test with simplified queries.
If expected rules are still not applying, review the pipeline’s rule source or consult the Fusion logs for rule evaluation traces.