[object Object]

← back to Agedwallpaper

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

5437d6bd82dac97cdd0631fa9f3c7574a325e08e · 2026-07-29 09:46:17 -0700 · Steve Abrams

Files touched

Diff

commit 5437d6bd82dac97cdd0631fa9f3c7574a325e08e
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Wed Jul 29 09:46:17 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 7cd168e..4d46415 100644
--- a/server.js
+++ b/server.js
@@ -234,7 +234,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));
   if (skip !== 'tag' && tag) {

← 5f6f7d7 corner-nav: live as-you-type search with thumbnail previews  ·  back to Agedwallpaper  ·  corner-nav: block javascript:/data: URIs in search preview ( 582613a →