From 36b231f0e3e4442bad4c780379f5dc6b85640f2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Parko=C5=82a?= <605123+tparkola@users.noreply.github.com> Date: Wed, 3 Jul 2024 11:09:21 +0200 Subject: [PATCH] [SSHOC-171] Improvement in actor search. --- .../marketplace/services/search/query/QueryParser.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/sshopencloud/marketplace/services/search/query/QueryParser.java b/src/main/java/eu/sshopencloud/marketplace/services/search/query/QueryParser.java index 8f9e190b..ce6afa39 100644 --- a/src/main/java/eu/sshopencloud/marketplace/services/search/query/QueryParser.java +++ b/src/main/java/eu/sshopencloud/marketplace/services/search/query/QueryParser.java @@ -26,7 +26,7 @@ public List parsePhrase(String phrase) { expression.append(token); } else { if (isAcceptableExpression(expression.toString())) { - result.add(new QueryPart(ClientUtils.escapeQueryChars(expression.toString()), false)); + result.add(new QueryPart(expression.toString(), false)); } expression = new StringBuilder(); } @@ -46,7 +46,9 @@ public List parsePhrase(String phrase) { } } } else { - expression.append(ClientUtils.escapeQueryChars(token)); + if (isAcceptableExpression(token)) { + expression.append(ClientUtils.escapeQueryChars(token)); + } } } if (isAcceptableExpression(expression.toString())) {