def in_bulk(self, object_ids):
        doc_map = {}

        docs = self._collection.find({'_id': {'$in': [ (not isinstance(id, ObjectId) and ObjectId(id)) or id for id in object_ids]}})
        for doc in docs:
            doc_map[str(doc['id'])] = self._document(**dict_keys_to_str(doc))
 
        return doc_map
Retrieve a set of documents by their ids.
dataset/ETHPy150Open aparo/django-elasticsearch/django_elasticsearch/manager.py/QuerySet.in_bulk