Product search returns relevant results
Why it matters
Search that queries only name or is case-sensitive returns empty results for shoppers typing 'red shirt' instead of 'Red Shirt', so the catalog's long tail is effectively invisible. Every zero-result search is an abandoned session and a lost order. Internal search is also a top SEO signal — sites that surface relevant results rank better and earn more crawl budget. Narrow or case-sensitive matching turns a working catalog into a dead end.
Severity rationale
Low because users can still browse categories, but every failed query is a direct conversion loss.
Remediation
Widen the query to at least name and description, pass mode: 'insensitive' so casing does not matter, and cap results so the response stays fast. Implement this in src/app/api/search/route.ts:
const results = await prisma.product.findMany({
where: {
OR: [
{ name: { contains: query, mode: 'insensitive' } },
{ description: { contains: query, mode: 'insensitive' } },
],
},
take: 10,
})
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Catalog & Product Logic Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
Taxons
History
- 2026-04-18·v1.0.0·Initial import from ecommerce-catalog·automated