Rebasely Beta: data may be purged

examples/storefront Public

YAML · 17 lines · 1.2 KiB · at 75e565d

title: Searching the catalogdescription: >-  The merchant renames a product, and a shopper searches for it a moment later. Every product  write updates the product's row in the search index, a separate D1 database. A search matches  in the index, then reads the products from the catalog, so prices, stock and retired products  are always current.actors: [merchant, shopper]steps:  - { from: merchant, to: storefront-api, label: "PUT /admin/products/linen-apron, admin token" }  - { from: storefront-api, to: db, label: upsert the product }  - { from: storefront-api, to: search, label: "one batch: delete the product's row, insert its name and description" }  - { from: storefront-api, to: merchant, label: "the product, or 503 search_index_failed to retry" }  - { from: shopper, to: storefront-api, label: "GET /search?q=linen apr" }  - { from: storefront-api, to: search, label: "MATCH '\"linen\" \"apr\"*', ranked by bm25, name weighted 10" }  - { from: search, to: storefront-api, label: "product ids, best match first" }  - { from: storefront-api, to: db, label: "read those products, active ones only" }  - { from: storefront-api, to: shopper, label: "the products in match order, with current price and stock" }