public function __invoke(ContentQueryParser $contentQuery)
{
$params = $contentQuery->getEntityManager()->createQueryBuilder()->getConnection()->getParams();
if (strpos($params['driver'], 'postgres') !== false) {
return $this->postgresSearch($contentQuery);
} else {
return call_user_func_array($contentQuery->getHandler('search'), [$contentQuery]);
}
}