Skip to content

Commit

Permalink
VCST-355: Add Sorting by Relevance for Catalog BackOffice (#718)
Browse files Browse the repository at this point in the history
feat: Use relevance sorting by default if searching by keyword.
  • Loading branch information
OlegoO committed Feb 9, 2024
1 parent f3b6987 commit dd84cae
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ angular.module('virtoCommerce.catalogModule')
skip: ($scope.pageSettings.currentPage - 1) * $scope.pageSettings.itemsPerPageCount,
take: $scope.pageSettings.itemsPerPageCount
};
if (searchCriteria.keyword && !searchCriteria.sort) {
searchCriteria.sort = "relevance";
}
return searchCriteria;
}

Expand Down

0 comments on commit dd84cae

Please sign in to comment.