Skip to content

Commit aba5efd

Browse files
committed
Elastic Search interferes with the default sort order of products (changing newest first to oldest first)
1 parent a04b0ef commit aba5efd

File tree

1 file changed

+3
-3
lines changed
  • app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext

1 file changed

+3
-3
lines changed

app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2015 Adobe
4+
* All Rights Reserved.
55
*/
66

77
namespace Magento\CatalogSearch\Model\ResourceModel\Fulltext;
@@ -581,7 +581,7 @@ protected function _beforeLoad()
581581
* for the same requests and products with the same relevance
582582
* NOTE: this does not replace existing orders but ADDs one more
583583
*/
584-
$this->setOrder('entity_id', Select::SQL_ASC);
584+
$this->setOrder('entity_id', Select::SQL_DESC);
585585
return parent::_beforeLoad();
586586
}
587587

0 commit comments

Comments
 (0)