From 0201eb15840d034936b927130c060911a0c192de Mon Sep 17 00:00:00 2001 From: Ruben Date: Sun, 4 Sep 2016 17:37:42 +0100 Subject: [PATCH] Show major hint --- src/Models/HitRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Models/HitRepository.php b/src/Models/HitRepository.php index b9585f4..2aff45c 100644 --- a/src/Models/HitRepository.php +++ b/src/Models/HitRepository.php @@ -9,7 +9,7 @@ class HitRepository extends EntityRepository public function getBetterHit(Hit $hit) { // we want only the slightly better hit... $query = $this->_em->createQuery( - "SELECT h FROM ".Hit::class." h WHERE h.target = :target AND h.score > :score ORDER BY h.score ASC" + "SELECT h FROM ".Hit::class." h WHERE h.target = :target AND h.score > :score ORDER BY h.score DESC" ) ->setMaxResults(1) ->setParameters([