# Path: shelf/metadata/keys.py
# class Keys(object):
#     MD5 = "md5Hash"
#     PATH = "artifactPath"
#     NAME = "artifactName"
#     CREATED_DATE = "createdDate"


from shelf.metadata.keys import Keys as MetadataKeys
from shelf.resource_identity import ResourceIdentity
from shelf.search import utils
        criteria["sort"] = utils.default_to_list(criteria.get("sort"))
        criteria["search"].append(search_path)

        formatted_criteria = self.search_parser.from_request(criteria)
        sort_criteria = formatted_criteria.get("sort", [])
        results = self.search_manager.search(formatted_criteria)

        if sort_criteria:
            results = self.container.search.sorter.sort(results, sort_criteria)

        artifact_list = self._list_artifacts(results, criteria.get("limit"))
        self.link_manager.assign_listing(artifact_list)

    def _list_artifacts(self, results, limit=None):
        """
            Creates a list of paths from the search results.

            Args:
                results(List[dict]): Formatted search results.
                limit(int | None): limit number of records

            Returns:
                list: Each element represents the path to an artifact.
        """
        artifact_list = []

        if limit:
            results = results[:limit]

        for result in results:

# Path: shelf/metadata/keys.py
# class Keys(object):
#     MD5 = "md5Hash"
#     PATH = "artifactPath"
#     NAME = "artifactName"
#     CREATED_DATE = "createdDate"


# Path: shelf/search_portal.py
from shelf.metadata.keys import Keys as MetadataKeys
from shelf.resource_identity import ResourceIdentity
from shelf.search import utils

        criteria["sort"] = utils.default_to_list(criteria.get("sort"))
        criteria["search"].append(search_path)

        formatted_criteria = self.search_parser.from_request(criteria)
        sort_criteria = formatted_criteria.get("sort", [])
        results = self.search_manager.search(formatted_criteria)

        if sort_criteria:
            results = self.container.search.sorter.sort(results, sort_criteria)

        artifact_list = self._list_artifacts(results, criteria.get("limit"))
        self.link_manager.assign_listing(artifact_list)

    def _list_artifacts(self, results, limit=None):
        """
            Creates a list of paths from the search results.

            Args:
                results(List[dict]): Formatted search results.
                limit(int | None): limit number of records

            Returns:
                list: Each element represents the path to an artifact.
        """
        artifact_list = []

        if limit:
            results = results[:limit]

        for result in results:

            resource_id = ResourceIdentity(result[MetadataKeys.PATH]["value"])