Código PHP:
Ver original
class JobRepository extends EntityRepository { // ... public function getForLuceneQuery($query) { $hits = Job::getLuceneIndex()->find($query); foreach ($hits as $hit) { $pks[] = $hit->pk; } { } $q = $this->createQueryBuilder('j') ->where('j.id IN (:pks)') ->setParameter('pks', $pks) ->andWhere('j.is_activated = :active') ->setParameter('active', 1) ->setMaxResults(20) ->getQuery(); return $q->getResult(); } }