Skip to content

Commit

Permalink
Fix when "q" is empty on search
Browse files Browse the repository at this point in the history
  • Loading branch information
lopes-vincent committed Dec 10, 2019
1 parent 36f8c1a commit 4144f63
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Controller/SearchController.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ public function searchAction(Request $request)
$textSearches = [];
$refSearch = [];
foreach ($searchWords as $searchWord) {
if ($searchWord === "") {
continue;
}

$textSearches[] = [
"multi_match" => [
"query" => $searchWord,
Expand Down Expand Up @@ -405,4 +409,4 @@ protected function getDefaultPseFromSource($source) {

}

}
}

0 comments on commit 4144f63

Please sign in to comment.