Search and catalog

Catalog search judged by revenue: Elasticsearch mapping, synonyms and Russian morphology, typos, facets, autocomplete, zero-downtime reindexing and zero-result logs. Plus the cases where plain SQL is enough.

14 articles

Elasticsearch Mapping Is Architecture, Not Configuration

For three weeks we couldn't figure out why the price filter wasn't working. Elasticsearch was up. Queries were coming in. Results were returning. But the price range — say, $15 to $50 — was being ignored completely. Products at $180 and $3 showed up side by side.

Relevance isn't revenue: teaching Elasticsearch to rank by business metrics

We ran an A/B test. The control group ranked search results by text relevance. The test group used a scoring function that factored in margin, stock levels, and sell-through rate. Click-through was nearly identical. Revenue per search session was 12% higher in the business-ranked variant.

Your Search Logs Are the Best Product Doc You're Not Reading

A client asked: "What are our customers actually searching for?" I pulled up Elasticsearch and exported the top 40 zero-results queries from the past week. Three of them were exact product names. In stock. Just written differently than the catalog.

"Socks" and "knee-highs" are the same product. Elasticsearch didn't know.

Three weeks of Elasticsearch setup (shards, replicas, mappings, custom tokenizers) got us to where fuzziness AUTO dropped zero-results from 22% to 11%. A real improvement. But 11% of searchers were still leaving empty-handed. I pulled the logs and found the problem wasn't typos. It was synonyms.