Skip to content

Commit

Permalink
fix(Search engine): Do not add quotes if multi word exact query, Solr…
Browse files Browse the repository at this point in the history
… Helper already does it
  • Loading branch information
ambroisemaupate committed Jul 6, 2023
1 parent 06cbf2d commit b0aa80a
Showing 1 changed file with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ public function escapeQuery(string $input): string
protected function getFormattedQuery(string $q, int $proximity = 1): array
{
$q = trim($q);
$singleWord = $this->isQuerySingleWord($q);
/**
* Generate a fuzzy query by appending proximity to each word
* @see https://lucene.apache.org/solr/guide/6_6/the-standard-query-parser.html#TheStandardQueryParser-FuzzySearches
Expand All @@ -256,12 +255,6 @@ protected function getFormattedQuery(string $q, int $proximity = 1): array
* Only escape exact query
*/
$exactQuery = $this->escapeQuery($q);
if (!$singleWord) {
/*
* adds quotes if multi word exact query
*/
$exactQuery = '"' . $exactQuery . '"';
}
/*
* Wildcard search for allowing autocomplete
*/
Expand Down

0 comments on commit b0aa80a

Please sign in to comment.