Skip to content
Ameen Abozaid
Planned lessonMID-043-L06

Demo: product search with typo tolerance and facets

  • Lesson 6 of 6
  • Mid-level
On This Lesson 3 topics

This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.

In this lesson

index Shop products and query them. Prepares MID-043-LAB1.

Draft outline details

Step by step

  1. Start OpenSearch (single node) with Docker; verify image version before recording.
  2. Create an index products_v1 with explicit mappings (name text, category keyword, price scaled/double) and alias products.
  3. Bulk-load products from the catalog database and run runing shoes with fuzziness; show results.
  4. Add category and price-range facets from aggregations.
  5. Planned mistake: rely on dynamic mapping, so category is analyzed as text and the facet shows broken words. Fix: explicit mapping with keyword, reindex.
  6. Apply an indexer consumer for ProductUpdated and show an update appearing in search.

Check your understanding

Why define mappings explicitly?

Show answer

Dynamic mapping guesses types and often guesses wrong.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Type to search levels, phases, modules and lessons.