Rule Trace
Rule trace shows which merchandising rules applied to a search, in what order, and how they affected the final results.
Overview
Rule trace provides a complete audit trail of which rules were applied, helping you understand how merchandising controls affected search results.
Trace Format
{
"query": "running shoes",
"rules_applied": [
{
"rule_id": "boost_high_margin",
"type": "boost",
"order": 1,
"products_affected": 15,
"impact": "+20% score boost"
},
{
"rule_id": "pin_new_arrivals",
"type": "pin",
"order": 2,
"products_affected": 1,
"impact": "Pinned to position 1"
},
{
"rule_id": "brand_diversity",
"type": "guardrail",
"order": 3,
"products_affected": 8,
"impact": "Limited to 2 per brand"
}
]
}
Best Practices
- Show order: Display rules in application order
- Show impact: Explain how each rule affected results
- Enable filtering: Allow filtering by rule type
- Export traces: Enable export for analysis
Related Topics
- Result Explanations - Understand rankings
- Change Logs - Track rule changes