is empty lucene query with OR fix (#10451)
* empty lucene query with OR fix * Fix unit test
This commit is contained in:
parent
9eef7acdb3
commit
8742fb39d3
|
@ -417,7 +417,7 @@ export class QueryBuilder<T> {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (this.query.empty) {
|
if (this.query.empty) {
|
||||||
build(this.query.empty, (key: string) => `!${key}:["" TO *]`)
|
build(this.query.empty, (key: string) => `(*:* -${key}:["" TO *])`)
|
||||||
}
|
}
|
||||||
if (this.query.notEmpty) {
|
if (this.query.notEmpty) {
|
||||||
build(this.query.notEmpty, (key: string) => `${key}:["" TO *]`)
|
build(this.query.notEmpty, (key: string) => `${key}:["" TO *]`)
|
||||||
|
|
|
@ -105,7 +105,7 @@ describe("internal search", () => {
|
||||||
"column": "",
|
"column": "",
|
||||||
},
|
},
|
||||||
}, PARAMS)
|
}, PARAMS)
|
||||||
checkLucene(response, `*:* AND !column:["" TO *]`, PARAMS)
|
checkLucene(response, `*:* AND (*:* -column:["" TO *])`, PARAMS)
|
||||||
})
|
})
|
||||||
|
|
||||||
it("test notEmpty query", async () => {
|
it("test notEmpty query", async () => {
|
||||||
|
|
Loading…
Reference in New Issue