From 08f1ddddd0b50fb1fdcc90427da3af1efa6f3f65 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Mon, 27 Jun 2022 13:54:03 +0100 Subject: [PATCH] Handle number types custom query --- 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 e7bc8e8afa..e4acf1160d 100644 --- a/packages/frontend-core/src/utils/lucene.js +++ b/packages/frontend-core/src/utils/lucene.js @@ -217,6 +217,9 @@ export const runLuceneQuery = (docs, query) => { const oneOf = match("oneOf", (docValue, testValue) => { if (typeof testValue === "string") { testValue = testValue.split(",") + if (typeof docValue === "number") { + testValue = testValue.map(item => Number(item)) + } } return !testValue?.includes(docValue) })