From f84bf5f3372b197e563209de20bd3537cf8c987a Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Mon, 27 Jun 2022 14:20:51 +0100 Subject: [PATCH] Using allPreProcessingOpts --- .../src/api/controllers/row/internalSearch.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/server/src/api/controllers/row/internalSearch.js b/packages/server/src/api/controllers/row/internalSearch.js index 731b726654..6fba0e47aa 100644 --- a/packages/server/src/api/controllers/row/internalSearch.js +++ b/packages/server/src/api/controllers/row/internalSearch.js @@ -235,15 +235,15 @@ class QueryBuilder { return "" } } - const preprocess = item => { - return builder.preprocess(item, { - escape: true, - lowercase: true, - }) - } - let orStatement = `"${preprocess(value[0])}"` + let orStatement = `${builder.preprocess( + value[0], + allPreProcessingOpts + )}` for (let i = 1; i < value.length; i++) { - orStatement += ` OR "${preprocess(value[i])}"` + orStatement += ` OR ${builder.preprocess( + value[i], + allPreProcessingOpts + )}` } return `${key}:(${orStatement})` })