From ec7dd3e40d078d5394cd1b9020464147c2827ac7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Katja=20Su=CC=88ss?= Date: Sat, 4 Feb 2023 18:42:13 +0100 Subject: [PATCH] Fix empty filter --- src/components/Searchkit/CustomESRequestSerializer.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/Searchkit/CustomESRequestSerializer.jsx b/src/components/Searchkit/CustomESRequestSerializer.jsx index cb849567..1db820f2 100644 --- a/src/components/Searchkit/CustomESRequestSerializer.jsx +++ b/src/components/Searchkit/CustomESRequestSerializer.jsx @@ -384,7 +384,11 @@ export class CustomESRequestSerializer { // agg is a key of aggFieldsMapping. // something like 'kompasscomponent_agg.inner.kompasscomponent_token' return isEmpty(filter) - ? { match_all: {} } + ? { + bool: { + filter: [], + }, + } : { bool: { filter: filter.filter(