Skip to content

Ranking

View MD

Luigi’s Box uses a complex ensemble of algorithms to determine the best order for search results. This process combines text relevance, business rules, personalization, and operational metrics.

The ranking model determines “Match Quality” based on several layers of signals, applied in this general order:

  1. Text match quality (Score): The foundation of ranking. Exact matches rank higher than fuzzy matches (typos) or partial matches.
  2. Availability: In-stock items match higher than out-of-stock or “available soon” items.
  3. Business metrics (Learning to rank): Products with higher engagement (clicks, conversions) are promoted. This “feedback loop” ensures the most popular products float to the top.
  4. Personalization: Results are re-ordered based on the individual user’s preferences and history.

You can influence this automated process by providing additional data in your product feed.

If you index a margin attribute, the system can prefer products with higher margins. This is a “signal” rather than a hard sort rule — it nudges high-margin products up without destroying relevance.

To promote new arrivals, index the introduced_at timestamp. The Freshness Ranker boosts new products for a configurable period (e.g., 60 days), helping them gain visibility before they have accumulated historical performance data.

You can also influence ranking dynamically with each API request using the prefer parameter (Soft Boosting). This allows you to boost products matching certain criteria for a specific query without filtering others out.

Example: Prefer “Nike” products for the current search. prefer[]=brand:Nike

See prefer[] parameter in the API reference.

For precise control, you can override algorithms using the Luigi’s Box App:

  • Booster: Set permanent boost rules for specific products or brands.
  • Merchandising: Pin products to specific positions for specific queries.