diff --git a/module/VuFindConsole/src/VuFindConsole/Command/ScheduledSearch/NotifyCommand.php b/module/VuFindConsole/src/VuFindConsole/Command/ScheduledSearch/NotifyCommand.php index e71da28ef5a..0975a01adaa 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/ScheduledSearch/NotifyCommand.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/ScheduledSearch/NotifyCommand.php @@ -98,6 +98,13 @@ class NotifyCommand extends Command implements TranslatorAwareInterface */ protected $limit = 50; + /** + * Sort order to use when performing searches + * + * @var string + */ + protected $sort = 'first_indexed desc'; + /** * Constructor * @@ -311,7 +318,7 @@ protected function getNewRecords($searchObject, $lastTime) // Prepare query $params = $searchObject->getParams(); $params->setLimit($this->limit); - $params->setSort('first_indexed desc', true); + $params->setSort($this->sort, true); $searchId = $searchObject->getSearchId(); try { $records = $searchObject->getResults();