Three strategies: hide (don’t return out-of-stock items at all — clean but users can’t bookmark restocks), demote (return them but rank below in-stock — most common default), and surface-with-cta (show prominently with “out of stock — notify me” — captures intent for restocks).
The right choice depends on supply volatility. For staples that restock daily, demote is fine — the noise is brief. For seasonal items or limited drops, surface-with-cta captures the most demand and converts notify-signups into purchases when the item returns. For permanently discontinued items, hide.
Measurement gotcha: out-of-stock filtering interacts heavily with zero-result rate. A strict hide policy can push borderline categories below the threshold for any results, hurting overall search quality. Always measure the joint impact, not just stock-aware metrics in isolation.