From d8fbeda20238aed29c4d7c52d7ca0187dd369117 Mon Sep 17 00:00:00 2001 From: Gilles Crettenand Date: Fri, 5 Jun 2015 16:18:31 +0200 Subject: [PATCH] sort by author then title when getting books --- Lib/Search/BookSearch.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/Search/BookSearch.php b/Lib/Search/BookSearch.php index 55b5756..241b66f 100644 --- a/Lib/Search/BookSearch.php +++ b/Lib/Search/BookSearch.php @@ -125,6 +125,8 @@ class BookSearch $bs = new static(); $bs->addOrQuery($codes, $field); + $bs->addSortField('author', \SolrQuery::ORDER_ASC); + $bs->addSortField('title', \SolrQuery::ORDER_ASC); $results = $bs->getResults(0, $count); return $results['books']; }