public function getBatch($count = self::BATCH_COUNT, array $filter = null)
{
$qb = $this->createQueryBuilder('c');
if (is_null($filter)) {
$qb->where('c.indexed IS NULL')->orWhere('c.indexed < c.time_updated')->orderBy('c.time_updated', 'DESC');
} else {
throw new IndexException("Filter is not implemented yet.");
}
if (is_numeric($count)) {
$qb->setMaxResults($count);
}
$batch = $qb->getQuery()->getResult();
return $batch;
}