From 243f41fd58315aa64672475400e1a52165132a7d Mon Sep 17 00:00:00 2001 From: Obafemi Teminife Date: Wed, 11 Dec 2024 14:15:59 +0100 Subject: [PATCH] fix(search): widened pillar result set --- src/search/search.service.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/search/search.service.ts b/src/search/search.service.ts index 14980bf5..fa752004 100644 --- a/src/search/search.service.ts +++ b/src/search/search.service.ts @@ -455,10 +455,10 @@ export class SearchService { ...headerText, activePillar: { slug: params.pillar, - items: go(params.item, items, { - limit: 20, - threshold: 0.3, - }).map(x => x.target), + items: [ + wanted, + ...items.filter(x => sluggify(x) !== wanted).slice(0, 20), + ].filter(Boolean), }, altPillars, },