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