This commit is contained in:
mike12345567 2021-07-19 14:32:14 +01:00
parent 65358cf10d
commit 2ec00c32b6
1 changed files with 6 additions and 2 deletions

View File

@ -150,14 +150,18 @@ class QueryBuilder {
build(this.query.equal, (key, value) => {
const escapedValue = luceneEscape(value.toLowerCase())
// have to do the or to manage straight values, or strings
return value ? `(${key}:${escapedValue} OR ${key}:"${escapedValue}")` : null
return value
? `(${key}:${escapedValue} OR ${key}:"${escapedValue}")`
: null
})
}
if (this.query.notEqual) {
build(this.query.notEqual, (key, value) => {
const escapedValue = luceneEscape(value.toLowerCase())
// have to do the or to manage straight values, or strings
return value ? `(!${key}:${escapedValue} OR !${key}:"${escapedValue}")` : null
return value
? `(!${key}:${escapedValue} OR !${key}:"${escapedValue}")`
: null
})
}
if (this.query.empty) {