We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1f1247 commit a50dae1Copy full SHA for a50dae1
app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/ProductSearch.php
@@ -156,6 +156,7 @@ private function getSortOrderArray(SearchCriteriaInterface $searchCriteria)
156
foreach ($sortOrders as $sortOrder) {
157
// I am replacing _id with entity_id because in ElasticSearch _id is required for sorting by ID.
158
// Where as entity_id is required when using ID as the sort in $collection->load();.
159
+ // @see \Magento\CatalogGraphQl\Model\Resolver\Products\Query\Search::getResult
160
if ($sortOrder->getField() === '_id') {
161
$sortOrder->setField('entity_id');
162
}
0 commit comments