From 469b807e752be9aba2f682261befb6226e718f1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Katja=20Su=CC=88ss?= Date: Sun, 23 Jul 2023 19:20:43 +0200 Subject: [PATCH] Exclude AND and OR --- src/components/Searchkit/CustomESRequestSerializer.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Searchkit/CustomESRequestSerializer.jsx b/src/components/Searchkit/CustomESRequestSerializer.jsx index 894c8383..31367ae2 100644 --- a/src/components/Searchkit/CustomESRequestSerializer.jsx +++ b/src/components/Searchkit/CustomESRequestSerializer.jsx @@ -140,8 +140,8 @@ export class CustomESRequestSerializer { // - search also for word parts (LSR-Lehrbetrieb: search also for LSR and Lehrbetrieb) let words = queryString.trim().split(' '); words = words - // filter out spaces and orphan " - .filter((word) => word !== '' && word !== '"'); + // filter out spaces, orphan ", "AND", and "OR" + .filter((word) => !['', '"', 'AND', 'OR', 'NOT'].includes(word)); words.forEach((word) => { word = _remove_orphan_leading_or_trailing_quotmarks(word);