From 52408a13f8266705c1338030ed9d902c0a217d1c Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Wed, 27 Jul 2022 17:34:42 +0100 Subject: [PATCH] Support for string bindings as array --- packages/frontend-core/src/utils/lucene.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/frontend-core/src/utils/lucene.js b/packages/frontend-core/src/utils/lucene.js index 51c5ab2f72..f398264edb 100644 --- a/packages/frontend-core/src/utils/lucene.js +++ b/packages/frontend-core/src/utils/lucene.js @@ -121,6 +121,9 @@ export const buildLuceneQuery = filter => { if (type === "boolean") { value = `${value}`?.toLowerCase() === "true" } + if (["contains", "notContains", "containsAny"].includes(operator) && type === "array" && typeof value === "string") { + value = value.split(",") + } if (operator.startsWith("range")) { const minint = SqlNumberTypeRangeMap[externalType]?.min || Number.MIN_SAFE_INTEGER