From 05c77c520b802281fe772f3d1449404f7ed61139 Mon Sep 17 00:00:00 2001 From: Marc Bachmann Date: Sat, 9 May 2020 16:51:13 +0200 Subject: [PATCH] fix: Also match words that have more than one query keyword --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 35db213..7d9a04a 100644 --- a/index.js +++ b/index.js @@ -38,7 +38,7 @@ function prepareSimpleTextSearch (collection, property) { const result = [] for (const { pruned, elem } of cachedPrunedElements || prunedElements()) { const match = pruned.match(regex) - if (match && match.length === length) result.push(elem) + if (match && match.length >= length) result.push(elem) } return result }