Issue
Predictive Merchandiser rules, such as boosts or blocks, may fail to take effect when the Neural Hybrid Search (NHS) stage is enabled in a query pipeline. While these rules function correctly in standard lexical pipelines, the expected query modifications are not visible in the final search results when NHS is active.
Diagnosis
To determine if this issue is occurring, compare the pipeline behavior when the Neural Hybrid Search stage is enabled versus disabled. If the rules trigger only when the NHS stage is inactive, it indicates a stage order dependency. Additionally, check the Solr logs or the Fusion query explain output to see if lexical parameters modified by the rules are being moved or "squashed" within the Neural Hybrid Query.
Environment
Fusion 5.9.x and above
Neural Hybrid Search
Predictive Merchandiser
Cause
The Neural Hybrid Search stage moves lexical parameters, including query modifications generated by rules, into a nested lexical query within the NeuralHybridQuery. If the rules stage is positioned before the NHS stage, the modifications applied to the q parameter are often lost or flattened during the NHS squashing process. Squashing works most effectively when lexical scores fall within a narrow range; extreme scores produced by boost rules can interfere with this differentiation if processed prematurely.
Resolution
Modify the query pipeline to ensure the rules are applied after the hybrid search logic has been established.
Adjust stage order
Move the Apply Rules stage so that it appears after the Neural Hybrid Search stage in the query pipeline. By placing the rules stage later in the sequence, the rule-based modifications (such as boosts) are applied to the final query structure rather than being subjected to the initial NHS squashing logic.
Verify collection configuration
Ensure that the query_rewrite collection is configured with a single shard and only one replica. This configuration is necessary for certain rule types, such as head/tail rewrites, to trigger and take effect reliably.
Tune squashing parameters
If rule-based boosts are still not providing sufficient differentiation, adjust the squashing factor within the Neural Hybrid Search stage. A lower squashing factor can help prevent huge lexical scores from rules from being flattened, preserving the intended impact on document ranking.
{
"lexicalSquash": 0.03,
"lexicalWeight": 0.7,
"vectorWeight": 0.3
}Upgrade considerations
If running a version of Fusion earlier than 5.9.10, consider upgrading. Versions 5.9.10 and later include a "collapse-friendly" NHS implementation specifically designed to better handle rule-based boosts and signals.