From 0336b322efb2c27cb892d329b2a78fa281424f39 Mon Sep 17 00:00:00 2001 From: sairaj mote Date: Fri, 3 Jun 2022 02:49:01 +0530 Subject: [PATCH] minor search optimization --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index ab5fc53..4c586fc 100644 --- a/index.html +++ b/index.html @@ -1386,7 +1386,7 @@ }) getRef('explore_heading').textContent = 'Explore all' } else { - const options = (type === 'category') ? { keys: ['categories'], threshold: 0 } : { keys: ['title', 'categories', 'tags'], threshold: 0.3 } + const options = (type === 'category') ? { keys: ['categories'], threshold: 0 } : { keys: ['title', 'tags'], threshold: 0.3 } const fuse = new Fuse(sortedByTime, options) const searchResult = fuse.search(query).map(v => v.item) searchResult.forEach(articleDetail => { @@ -1581,7 +1581,7 @@ const searchKey = e.target.value.trim() if (searchKey !== '') { const options = { - keys: ['title', 'tags', 'categories'], + keys: ['title', 'tags'], threshold: 0.3 } const fuse = new Fuse(getArrayOfObj(floGlobals.appObjects.rmTimes.articles).sort((a, b) => b.published - a.published), options)