From c6792f9903603ba4af6abf8330d4769c77defce4 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 17 Dec 2021 10:00:46 +0000 Subject: [PATCH] Update client side lucene searching to treat string startsWith matches as case-insensitive --- packages/builder/src/helpers/lucene.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/helpers/lucene.js b/packages/builder/src/helpers/lucene.js index d344b462d1..4cc39fcb80 100644 --- a/packages/builder/src/helpers/lucene.js +++ b/packages/builder/src/helpers/lucene.js @@ -115,7 +115,7 @@ export const luceneQuery = (docs, query) => { // Process a string match (fails if the value does not start with the string) const stringMatch = match("string", (key, value, doc) => { - return !doc[key] || !doc[key].startsWith(value) + return !doc[key] || !doc[key].toLowerCase().startsWith(value?.toLowerCase()) }) // Process a fuzzy match (treat the same as starts with when running locally)