← back to Micawallpaper
search: /api matcher now covers title+tags+description+type+vendor+sku
be08e4c94bf0f4757d50a2ab81183bc8a13383c2 · 2026-07-29 09:46:17 -0700 · Steve Abrams
Files touched
Diff
commit be08e4c94bf0f4757d50a2ab81183bc8a13383c2
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 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/server.js b/server.js
index 88d028c..a4b8e30 100644
--- a/server.js
+++ b/server.js
@@ -212,7 +212,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, RAIL_SYN));
if (vendor && vendor !== 'all') list = list.filter(p => p.vendor === vendor);
@@ -237,7 +237,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, RAIL_SYN));
const aesthetics = railFacets(list, SITE_RAILS, RAIL_SYN);
← 910998d corner-nav: live as-you-type search with thumbnail previews
·
back to Micawallpaper
·
corner-nav: block javascript:/data: URIs in search preview ( e22ad5a →