Documents must be sorted by title, correct bug #0025982
authorymh <ymh.work@gmail.com>
Wed, 18 Jan 2017 11:33:56 +0100
changeset 489 18613f052d56
parent 488 0161e028afb7
child 490 76da86cf9696
Documents must be sorted by title, correct bug #0025982
server/src/app/Repositories/RdfDocumentRepository.php
--- a/server/src/app/Repositories/RdfDocumentRepository.php	Tue Jan 17 18:57:25 2017 +0100
+++ b/server/src/app/Repositories/RdfDocumentRepository.php	Wed Jan 18 11:33:56 2017 +0100
@@ -204,10 +204,10 @@
             if(!empty($limitsClauses)) {
                 $limitsClausesStr = "\n" . join(" ", $limitsClauses);
             }
-            $sortClauseStr = "\n ORDER BY ?uri";
+            $sortClauseStr = "\n ORDER BY ASC(?title)";
             $total = $this->getCount();
         } else {
-            $esRes = $this->queryES($filters, $offset, $limit);
+            $esRes = $this->queryES($filters, $offset, $limit, ["title.raw" => 'asc']);
             // WARNING: we count on the fact that php keep keys order
             $total = intval($esRes['total']);
             foreach($esRes['documents'] as $esDocId) {