What is search in Layers?
Search is the system that connects your customers to your products. When a shopper types a query, Layers goes beyond simple keyword matching — it combines semantic understanding, keyword relevance, engagement data, and contextual awareness to rank and return the most relevant products. Layers supports multiple search modes: text search for keyword and natural-language queries, image search for visual discovery, similar product search for finding related items, and autocomplete for real-time query suggestions.How search ranking works
Every text search result is scored using five signal groups. Each group contributes a percentage of the total score, and all group weights always sum to 100%:| Signal group | What it measures |
|---|---|
| Semantic | How closely product content matches the meaning of the query |
| Keyword | How well exact terms in the query match product fields |
| Engagement | How customers interact with products (views, sales, cart sessions) |
| Freshness | How recently the product was published |
| Inventory | Whether the product is in stock |
Query understanding
Layers interprets what your customers are searching for, not just the words they type. The query understanding pipeline includes:- Query expansion — Enriches searches with synonyms and related terms. A search for “sneakers” also considers “athletic shoes” and “trainers.”
- Typo tolerance — Corrects spelling mistakes automatically so customers still find what they need.
- Intent detection — Recognizes signals like price sensitivity, sale interest, and feature preferences within the query.
- Contextual awareness — Uses cart contents, purchase history, and geographic location to personalize how queries are interpreted.
Ranking rules
Beyond global signal weights, you can create ranking rules that apply conditional adjustments to search results:- Boost — Promote products matching specific attributes higher in results
- Bury — Demote products matching specific attributes lower in results
- Pin — Lock specific products to exact positions for particular queries
Search rules
Search rules modify how search requests are processed before results are returned. They can replace or modify the search query, add additional filters, or override sort orders — all based on targeting conditions like the query itself, which collection the shopper is browsing, or shopper context such as location, channel, and customer data.Next steps
- Ranking relevancy — Tuning signal weights and creating ranking rules
- Query understanding — How Layers interprets search queries
- Typo tolerance — How spelling mistakes are corrected
- Search rules — Dynamic request modification based on conditions
- Filtering language — Applying filters to narrow search results
- Tune signal weights — Step-by-step guide to adjusting ranking