Learning to Rank (LTR) frames ranking as a supervised problem: given a query and a candidate list, output an ordering. Three flavors: pointwise (score each item independently), pairwise (predict which of two items is more relevant — RankNet, LambdaRank), and listwise (optimize the full ordering directly — LambdaMART, ListNet).
In ecommerce, LTR shines as the re-rank stage on top of BM25 and vector retrieval. Features feed in: text similarity scores, click-through rates, conversion rates, recency, in-stock status, price, margin, brand authority. The model figures out the weighting better than a hand-tuned linear formula.
You need labels: either explicit (human raters scoring (query, product) pairs) or implicit (clicks and purchases as positive signals, with position-bias correction). Most stores start with implicit labels at scale and only invest in explicit labels for evaluation sets.