diff --git a/lib/RoadizCoreBundle/src/SearchEngine/AbstractSearchHandler.php b/lib/RoadizCoreBundle/src/SearchEngine/AbstractSearchHandler.php index 17e7b93e..9e12ac68 100644 --- a/lib/RoadizCoreBundle/src/SearchEngine/AbstractSearchHandler.php +++ b/lib/RoadizCoreBundle/src/SearchEngine/AbstractSearchHandler.php @@ -69,6 +69,7 @@ public function searchWithHighlight( ): SearchResultsInterface { $args = $this->argFqProcess($args); $args["fq"][] = "document_type_s:" . $this->getDocumentType(); + $args["hl.q"] = $this->escapeQuery(trim($q)); $args = array_merge($this->getHighlightingOptions($args), $args); $response = $this->nativeSearch($q, $args, $rows, $searchTags, $proximity, $page); return $this->createSearchResultsFromResponse($response);