← back to Vinylwallpaper
search: /api matcher now covers title+tags+description+type+vendor+sku
81f57b2ef96a657945f66463778980b586fb0560 · 2026-07-29 09:46:18 -0700 · Steve Abrams
Files touched
Diff
commit 81f57b2ef96a657945f66463778980b586fb0560
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Wed Jul 29 09:46:18 2026 -0700
search: /api matcher now covers title+tags+description+type+vendor+sku
---
server.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/server.js b/server.js
index 2bed776..c2915f7 100644
--- a/server.js
+++ b/server.js
@@ -189,7 +189,7 @@ app.get('/api/products', (req, res) => {
let list = PRODUCTS_NICHE;
if (q) {
const needle = q.toLowerCase();
- list = list.filter(p => (p.title || '').toLowerCase().includes(needle) || (p.tags || []).some(t => 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 => t.toLowerCase().includes(needle)));
}
if (aesthetic && aesthetic !== 'all') list = list.filter(p => productInRail(p, aesthetic));
if (vendor && vendor !== 'all') list = list.filter(p => p.vendor === vendor);
@@ -225,7 +225,7 @@ app.get('/api/facets', (req, res) => {
let list = PRODUCTS_NICHE;
if (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 (aesthetic && aesthetic !== 'all') list = list.filter(p => productInRail(p, aesthetic));
const aesthetics = railFacets(list, SITE_RAILS);
← dac9369 corner-nav: live as-you-type search with thumbnail previews
·
back to Vinylwallpaper
·
corner-nav: block javascript:/data: URIs in search preview ( cc25a80 →