[object Object]

← back to 1920swallpaper

search: /api matcher now covers title+tags+description+type+vendor+sku

a21313eb5589ace5876e93aad1a243fc190cd443 · 2026-07-29 09:46:16 -0700 · Steve Abrams

Files touched

Diff

commit a21313eb5589ace5876e93aad1a243fc190cd443
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Wed Jul 29 09:46:16 2026 -0700

    search: /api matcher now covers title+tags+description+type+vendor+sku
---
 server.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server.js b/server.js
index 5575611..c54df66 100644
--- a/server.js
+++ b/server.js
@@ -216,7 +216,7 @@ function filterProducts(query, skip) {
   const { q, aesthetic, vendor, tag } = query;
   if (skip !== 'q' && q) {
     const needle = String(q).toLowerCase();
-    list = list.filter(p => (p.title || '').toLowerCase().includes(needle) || (p.tags || []).some(t => String(t).toLowerCase().includes(needle)));
+    list = list.filter(p => (p.title || '').toLowerCase().includes(needle) || (p.description || p.body_html || '').toLowerCase().includes(needle) || (p.product_type || '').toLowerCase().includes(needle) || (p.vendor || '').toLowerCase().includes(needle) || (p.sku || '').toLowerCase().includes(needle) || (p.tags || []).some(t => String(t).toLowerCase().includes(needle)));
   }
   if (skip !== 'aesthetic' && aesthetic && aesthetic !== 'all') list = list.filter(p => productInRail(p, aesthetic, RAIL_SYN));
   // SWEEP-A1: tag filter — sub-bucket rails on the homepage call /api/products?tag=<name>

← a467289 corner-nav: live as-you-type search with thumbnail previews  ·  back to 1920swallpaper  ·  corner-nav: block javascript:/data: URIs in search preview ( 0ed0e0d →