Fixed the issue of reload search results when search query is a single word
This commit is contained in:
parent
678695681d
commit
81342141fc
1 changed files with 4 additions and 2 deletions
|
|
@ -162,9 +162,11 @@ class AdvancedSearchQuery {
|
|||
}
|
||||
$q = implode(' ', $q);
|
||||
|
||||
|
||||
|
||||
/** @var Solarium\QueryType\Select\Query\Query $solarium_query */
|
||||
if ((strpos($q, "*") !== false || strpos($q, "?") !== false)) {
|
||||
// enable wildcard
|
||||
if ((strpos($q, "*") !== false || strpos($q, "?") !== false) || (strpos(trim($q), ' ') === false) ) {
|
||||
// if the query string contain '*', '?', OR is a single world, enable wildcard
|
||||
$tmp = str_replace('"', "", trim($q));
|
||||
$query_fields = [];
|
||||
foreach ($field_mapping as $key => $field) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue