You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If searched for "test" it gets escaped and then trimmed to \"test\ which leads to an error:
[type] => query_shard_exception
[reason] => Failed to parse query [\"test\]
[caused_by] => Array
(
[type] => parse_exception
[reason] => Cannot parse '\"test\': Lexical error at line 1, column 17. Encountered: <EOF> after : ""
[caused_by] => Array
(
[type] => token_mgr_error
[reason] => Lexical error at line 1, column 17. Encountered: <EOF> after : ""
)
)
It can be patched with:
Index: Classes/Eel/ElasticSearchQueryBuilder.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================diff --git a/Classes/Eel/ElasticSearchQueryBuilder.php b/Classes/Eel/ElasticSearchQueryBuilder.php--- a/Classes/Eel/ElasticSearchQueryBuilder.php +++ b/Classes/Eel/ElasticSearchQueryBuilder.php (date 1649436183235)@@ -678,7 +678,7 @@
public function fulltext(string $searchWord, array $options = []): QueryBuilderInterface
{
// We automatically enable result highlighting when doing fulltext searches. It is up to the user to use this information or not use it.
- $this->request->fulltext(trim(json_encode($searchWord, JSON_UNESCAPED_UNICODE), '"'), $options);+ $this->request->fulltext(trim(json_encode($searchWord, JSON_UNESCAPED_UNICODE), '\\"'), $options);
$this->request->highlight(150, 2);
return $this;
If searched for
"test"
it gets escaped and then trimmed to\"test\
which leads to an error:It can be patched with:
Originally posted by @fdsis in #228 (comment)
The text was updated successfully, but these errors were encountered: