← back to Dw Photo Capture
Recognize Pattern: strip -SAMPLE suffix from result SKUs (2,900 sample-variant rows showed sample SKU on card)
ad48b18064a03836af3b27a726069d59a4dec3b2 · 2026-06-26 05:57:50 -0700 · Steve Abrams
Files touched
Diff
commit ad48b18064a03836af3b27a726069d59a4dec3b2
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Fri Jun 26 05:57:50 2026 -0700
Recognize Pattern: strip -SAMPLE suffix from result SKUs (2,900 sample-variant rows showed sample SKU on card)
---
server.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server.js b/server.js
index 90d9007..a83b94d 100644
--- a/server.js
+++ b/server.js
@@ -1293,7 +1293,7 @@ function unifiedSimilar(terms) {
// score = how many recognized terms this row matches; the WHERE is just score>0 (≥1 match).
const score = t.map(x => `(case when ${hay} like '%${x}%' then 1 else 0 end)`).join('+');
const SQL = `select regexp_replace(coalesce(shopify_id,''),'\\D','','g') as product_id,
- coalesce(dw_sku,''), coalesce(mfr_sku,''), coalesce(title,''), coalesce(vendor,''),
+ regexp_replace(coalesce(dw_sku,''),'-?sample$','','i'), coalesce(mfr_sku,''), coalesce(title,''), coalesce(vendor,''),
coalesce(case when price>4.25 then price end, retail_price, min_variant_price, price),
coalesce(image_url,''), upper(coalesce(status,'')), (${score}) as score
from shopify_products
← f050ab3 test: fuzzyVendor edge guards + disk-full debug note (cycle
·
back to Dw Photo Capture
·
auto-save: 2026-06-26T06:12:56 (1 files) — data/build.json 3eaa90d →