Browse Source

Handle number types custom query

pull/6455/head
Mel O'Hagan 4 years ago
parent
commit
2db45457d6
  1. 3
      packages/frontend-core/src/utils/lucene.js

3
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)
})

Loading…
Cancel
Save