A ranking framework for automotive parts search that prioritizes fitment precision, then commercial relevance, to reduce wrong-fit orders.
Ranking objective
For general e-commerce platforms, search ranking is optimized for click-through rate and commercial conversion. If a user searches for 'running shoes' and buys the third result, the algorithm succeeds. In automotive e-commerce, this approach fails. Search is only successful if the returned part fits the buyer's vehicle. Precision must be prioritized over generic click popularity.
If the search engine returns a highly popular alternator that doesn't fit the user's specific engine code, the transaction results in a wrong-fit return. This guide details the Elasticsearch/OpenSearch query strategy we designed for a B2B catalog managing 10.2M SKUs, prioritizing vehicle fitment security.
Scoring formula
We apply a multi-phase scoring model where fitment confidence acts as a strict multiplier, followed by secondary text relevance and commercial signals:
score = (0.55 * fitment_confidence) +
(0.20 * oem_reference_match) +
(0.15 * supplier_quality_score) +
(0.10 * commercial_signal)Retrieval pipeline
The query matches text keywords, applies compatibility filters based on the selected vehicle, and re-ranks the results before rendering:
Critical query guardrails
To ensure fitment precision and catalog safety, we implement several search query controls:
- Vehicle context bitset filtering: When a user selects a vehicle (e.g., via K-Type or KBA number), the search engine applies a cached filter. This instantly excludes incompatible parts from the candidate retrieval set, ensuring sub-10ms queries.
- OEM cross-reference matching: We expand manufacturer part numbers using an internal synonym index. A search for '0 986 494 027' retrieves the exact Bosch part and all normalized OEM cross-references.
- Supplier quality penalty: Suppliers with historically high return rates or frequent inventory errors receive a lower scoring weight. This demotes unreliable listings to the second page.
- Compatibility explainability: Every search result must return an explainability token. The UI uses this token to show the user exactly why the part fits (e.g., 'Matches BMW 320d engine code N47D20C').
Online experiment metrics
We validate ranking changes using A/B testing, tracking three primary operational metrics:
- Wrong-Fit Return Rate: The percentage of completed orders returned due to compatibility errors.
- Cart Add Rate after vehicle selection: The frequency of users adding a part to their cart once compatibility is verified.
- Search abandonment rate: The percentage of searches that result in no click or cart addition, signaling poor relevance.
Our take
Automotive search is a data classification problem, not a text match problem. If you rely on basic full-text search engines to rank auto parts, you will suffer from high return rates and poor margins. Cache compatibility records as binary bitsets at the index layer, filter out incompatible items before scoring, and rank results based on fitment confidence first.