Fix lucene.spec.ts.
This commit is contained in:
parent
3bc1e6b387
commit
946bd0ef7d
|
@ -431,8 +431,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) => {
|
||||||
|
|
||||||
// Because the structure of an empty filter looks like this:
|
// Because the structure of an empty filter looks like this:
|
||||||
// { empty: { someKey: null } }
|
// { empty: { someKey: null } }
|
||||||
//
|
//
|
||||||
|
@ -440,10 +439,11 @@ export class QueryBuilder<T> {
|
||||||
// in weird behaviour when the empty filter is the only filter. We get around
|
// in weird behaviour when the empty filter is the only filter. We get around
|
||||||
// this by setting `allFiltersEmpty` to false here.
|
// this by setting `allFiltersEmpty` to false here.
|
||||||
allFiltersEmpty = false
|
allFiltersEmpty = false
|
||||||
|
return `(*:* -${key}:["" TO *])`
|
||||||
|
})
|
||||||
}
|
}
|
||||||
if (this.#query.notEmpty) {
|
if (this.#query.notEmpty) {
|
||||||
build(this.#query.notEmpty, (key: string) => `${key}:["" TO *]`)
|
build(this.#query.notEmpty, (key: string) => {
|
||||||
|
|
||||||
// Because the structure of a notEmpty filter looks like this:
|
// Because the structure of a notEmpty filter looks like this:
|
||||||
// { notEmpty: { someKey: null } }
|
// { notEmpty: { someKey: null } }
|
||||||
//
|
//
|
||||||
|
@ -451,6 +451,8 @@ export class QueryBuilder<T> {
|
||||||
// in weird behaviour when the empty filter is the only filter. We get around
|
// in weird behaviour when the empty filter is the only filter. We get around
|
||||||
// this by setting `allFiltersEmpty` to false here.
|
// this by setting `allFiltersEmpty` to false here.
|
||||||
allFiltersEmpty = false
|
allFiltersEmpty = false
|
||||||
|
return `${key}:["" TO *]`
|
||||||
|
})
|
||||||
}
|
}
|
||||||
if (this.#query.oneOf) {
|
if (this.#query.oneOf) {
|
||||||
build(this.#query.oneOf, oneOf)
|
build(this.#query.oneOf, oneOf)
|
||||||
|
|
Loading…
Reference in New Issue