Configuration for default sort order
[phinde.git] / src / phinde / Elasticsearch.php
index 6c90480475d152a361ea0eb645dfb842265310a7..c24f6cd60b690f49baf32539d35c69d2be08071d 100644 (file)
@@ -135,6 +135,9 @@ class Elasticsearch
             )
         );
 
+        if ($sort == '' && $GLOBALS['phinde']['defaultSort'] == 'date') {
+            $sort = 'date';
+        }
         if ($sort == 'date') {
             $sortCfg = array('status.modate' => array('order' => 'desc'));
         } else {