def get_documents(cls, ids):
 fields = cls.get_mapping()['properties'].keys()
 ret = cls.search().filter(id__in=ids).values_dict(*fields)[:len(ids)]
 return cls.reshape(ret)

def get_documents ( cls , ids ) : fields = cls . get_mapping ( ) [ 'properties' ] . keys ( ) ret = cls . search ( ) . filter ( id__in = ids ) . values_dict ( * fields ) [ : len ( ids ) ] return cls . reshape ( ret )
returns a list of es documents with specified ids and doctype :arg cls: the mapping type class with a .