Designing a Search Experience – Part 2: Clip-On, an automotive tools company with an extensive catalog

Antoine Hemery5 Jul 2022

Problem

A store with a wide catalog sells items that each need different attributes. Wrenches have a head size and wire strippers have wire-gauge holes. A search index needs the same fields on every record, so one schema cannot hold all of these attributes directly. Queries are also very specific. Shoppers type a size, a material and a country along with the tool name, and a record without those words is not found.

Example from the article: a fictional reseller of automotive tools, "Clip-On", must make the query 1/4in 12 point steel usa wrench find the right wrench.

Solution in brief

Keep the attributes shared by all tools (material, manufacturer, country of origin) as ordinary fields. Put the attributes that differ by product into one extra text field, specs, written as a short human-readable string that mirrors how shoppers type queries. The index is tuned for search, so this field is never shown to the user.

Questions this case answers
  • How to represent items with heterogeneous, type-specific attributes in a search index that needs one consistent schema, so that long multi-attribute queries match
  • How to make very specific product queries such as a size, material and origin match in a search index?
  • How to index a catalog where every product type has different attributes, while the index needs consistent fields?
  • How to decide which product attributes go into the search index and which stay only in the product database?

Tools and methods

  • Algolia — hosted search index, where the product records are loaded for fast lookup
  • Shared attribute fields — material, manufacturer, countryOfOrigin on every record
  • Serialized specs field — one searchable string with product-specific attributes, in the words shoppers use
Continue reading — it's free

Google or a one-time email code. No password.