Has all of internalSearch
This commit is contained in:
parent
89c4175832
commit
71adcfab3c
|
@ -171,10 +171,17 @@ class QueryBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
const contains = (key, value) => {
|
const contains = (key, value) => {
|
||||||
if (!value && value !== 0) {
|
if (!Array.isArray(value) || value.length === 0) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
return `${key}:${builder.preprocess(value, { escape: true })}`
|
let andStatement = `${builder.preprocess(value[0], { escape: true })}`
|
||||||
|
for (let i = 1; i < value.length; i++) {
|
||||||
|
andStatement += ` AND ${builder.preprocess(
|
||||||
|
value[i],
|
||||||
|
{ escape: true }
|
||||||
|
)}`
|
||||||
|
}
|
||||||
|
return `${key}:(${andStatement})`
|
||||||
}
|
}
|
||||||
|
|
||||||
const oneOf = (key, value) => {
|
const oneOf = (key, value) => {
|
||||||
|
|
Loading…
Reference in New Issue