Skip to content

Commit

Permalink
Fixing problems when switching between match any and match all (#11179)
Browse files Browse the repository at this point in the history
* Make sure displayed filter count is correct

* Fix for false boolean filter
  • Loading branch information
melohagan committed Jul 11, 2023
1 parent eb2b8bf commit 58d66c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/backend-core/src/db/lucene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,9 @@ export class QueryBuilder<T> {
if (!value) {
return null
}
if (typeof value === "boolean") {
return `(*:* AND !${key}:${value})`
}
return `!${key}:${builder.preprocess(value, allPreProcessingOpts)}`
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
$: datasource = getDatasourceForProvider($currentAsset, componentInstance)
$: schema = getSchemaForDatasource($currentAsset, datasource)?.schema
$: schemaFields = Object.values(schema || {})
$: text = getText(value)
$: text = getText(value?.filter(filter => filter.field))
async function saveFilter() {
dispatch("change", tempValue)
Expand Down

0 comments on commit 58d66c7

Please sign in to comment.