diff --git a/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/FilterProcessor.php b/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/FilterProcessor.php index b663a3a2f733c..c9f10c183b50c 100644 --- a/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/FilterProcessor.php +++ b/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/FilterProcessor.php @@ -72,6 +72,15 @@ private function addFilterGroupToCollection( if (!$isApplied) { $condition = $filter->getConditionType() ? $filter->getConditionType() : 'eq'; $fields[] = $this->getFieldMapping($filter->getField()); + + if ($condition === 'fulltext') { + // NOTE: This is not a fulltext search, but the best way to search something when + // a SearchCriteria with "fulltext" condition is provided over a MySQL table + // (see https://github.com/magento-engcom/msi/issues/1221) + $condition = 'like'; + $filter->setValue('%' . $filter->getValue() . '%'); + } + $conditions[] = [$condition => $filter->getValue()]; } }