Disable fulltext search for the time being

This commit is contained in:
Björn Fromme
2020-02-21 09:23:14 +01:00
parent fcb5cfc336
commit 5b1be3ac1f
@@ -280,23 +280,23 @@ abstract class AbstractRepository extends \TYPO3\CMS\Extbase\Persistence\Reposit
$this->addTransportationFilterConditions($query, $filterSettings);
// Default fulltext search in case autocompletion has not been used
if ((int) $filterSettings->getDestinationUid() === 0 && !empty($filterSettings->getDestinationName())) {
$query
->andWhere($query->expr()->orX(
$query->expr()->like('LOWER(date.country_name) COLLATE utf8_bin',':destination'),
$query->expr()->like('LOWER(date.country_keywords) COLLATE utf8_bin', ':destination'),
$query->expr()->like('LOWER(date.region_name) COLLATE utf8_bin', ':destination'),
$query->expr()->like('LOWER(date.region_keywords) COLLATE utf8_bin', ':destination'),
$query->expr()->like('LOWER(date.city_name) COLLATE utf8_bin', ':destination'),
$query->expr()->like('LOWER(date.city_keywords) COLLATE utf8_bin', ':destination'),
$query->expr()->like('LOWER(date.hotel_name) COLLATE utf8_bin', ':destination'),
$query->expr()->like('LOWER(date.hotel_keywords) COLLATE utf8_bin', ':destination'),
$query->expr()->like('LOWER(date.product_name) COLLATE utf8_bin', ':destination'),
$query->expr()->like('LOWER(date.product_keywords) COLLATE utf8_bin', ':destination')
))
->setParameter('destination', '%' . mb_strtolower($filterSettings->getDestinationName()) . '%')
;
}
// if ((int) $filterSettings->getDestinationUid() === 0 && !empty($filterSettings->getDestinationName())) {
// $query
// ->andWhere($query->expr()->orX(
// $query->expr()->like('LOWER(date.country_name) COLLATE utf8_bin',':destination'),
// $query->expr()->like('LOWER(date.country_keywords) COLLATE utf8_bin', ':destination'),
// $query->expr()->like('LOWER(date.region_name) COLLATE utf8_bin', ':destination'),
// $query->expr()->like('LOWER(date.region_keywords) COLLATE utf8_bin', ':destination'),
// $query->expr()->like('LOWER(date.city_name) COLLATE utf8_bin', ':destination'),
// $query->expr()->like('LOWER(date.city_keywords) COLLATE utf8_bin', ':destination'),
// $query->expr()->like('LOWER(date.hotel_name) COLLATE utf8_bin', ':destination'),
// $query->expr()->like('LOWER(date.hotel_keywords) COLLATE utf8_bin', ':destination'),
// $query->expr()->like('LOWER(date.product_name) COLLATE utf8_bin', ':destination'),
// $query->expr()->like('LOWER(date.product_keywords) COLLATE utf8_bin', ':destination')
// ))
// ->setParameter('destination', '%' . mb_strtolower($filterSettings->getDestinationName()) . '%')
// ;
// }
// Product
if ((int) $filterSettings->getProductUid() > 0) {