Demo: product search with typo tolerance and facets
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
- Start OpenSearch (single node) with Docker; verify image version before recording.
- Create an index
products_v1with explicit mappings (nametext,categorykeyword,pricescaled/double) and aliasproducts. - Bulk-load products from the catalog database and run
runing shoeswith fuzziness; show results. - Add category and price-range facets from aggregations.
- Planned mistake: rely on dynamic mapping, so
categoryis analyzed as text and the facet shows broken words. Fix: explicit mapping withkeyword, reindex. - Apply an indexer consumer for
ProductUpdatedand 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.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.