suggesstion issue fix (#4175)

This commit is contained in:
esakkiraja100116 2023-04-26 22:19:16 +05:30 committed by Dan Brown
parent 8cd6c797e8
commit 78fecdfcb0
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9

View File

@ -218,6 +218,7 @@ class SearchRunner
$subQuery->where('entity_type', '=', $entity->getMorphClass());
$subQuery->where(function (Builder $query) use ($terms) {
foreach ($terms as $inputTerm) {
$inputTerm = (strpos($inputTerm, "\\") !== false) ? str_replace("\\", "\\\\", $inputTerm) : $inputTerm;
$query->orWhere('term', 'like', $inputTerm . '%');
}
});