Add rand ordering
This commit is contained in:
parent
2b769f64d0
commit
201681aadb
1 changed files with 1 additions and 1 deletions
|
@ -39,7 +39,7 @@ class HitRepository extends EntityRepository
|
|||
}
|
||||
|
||||
$query = $this->_em->createQuery(
|
||||
"SELECT h, ABS(:score - h.emotions.$emotionField) as HIDDEN distance FROM ".Hit::class." h WHERE h.hasImage = :has ORDER BY distance ASC "
|
||||
"SELECT h, ABS(:score - h.emotions.$emotionField) as HIDDEN distance FROM ".Hit::class." h WHERE h.hasImage = :has ORDER BY distance ASC, RAND() "
|
||||
)
|
||||
->setParameters([
|
||||
'score' => $score,
|
||||
|
|
Loading…
Reference in a new issue