def get_records_by_types()

in ees_microsoft_outlook/sync_enterprise_search.py [0:0]


    def get_records_by_types(self, documents):
        """This method is used to for grouping the document based on their type
        :param documents: Document to be indexed
        Returns:
             dict_count: Dictionary of type with its count
        """
        if not documents:
            return {}
        dict_count = collections.defaultdict(list)
        for item in documents:
            dict_count[item["type"]].append(item["id"])
        return dict_count