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);
|
$q = implode(' ', $q);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** @var Solarium\QueryType\Select\Query\Query $solarium_query */
|
/** @var Solarium\QueryType\Select\Query\Query $solarium_query */
|
||||||
if ((strpos($q, "*") !== false || strpos($q, "?") !== false)) {
|
if ((strpos($q, "*") !== false || strpos($q, "?") !== false) || (strpos(trim($q), ' ') === false) ) {
|
||||||
// enable wildcard
|
// if the query string contain '*', '?', OR is a single world, enable wildcard
|
||||||
$tmp = str_replace('"', "", trim($q));
|
$tmp = str_replace('"', "", trim($q));
|
||||||
$query_fields = [];
|
$query_fields = [];
|
||||||
foreach ($field_mapping as $key => $field) {
|
foreach ($field_mapping as $key => $field) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue