def test_chunked_itersearch_with_meta_returns_meta(self):
        for size in (10, 100):
            scrollCounter = 0
            docsCounter = 0
            time.sleep(1)
            for docs, meta in self.ss.itersearch(index=self._index,
                                                 doc_type=self._doc_type,
                                                 body=dict(query=dict(
                                                     match_all={})),
                                                 scroll='10m', size=size,
                                                 chunked=True,
                                                 with_meta=True):
                docsCounter += len(docs)
                scrollCounter += 1

            self.assertEquals(docsCounter, self._total_docs)
            self.assertEquals(scrollCounter, self._total_docs / size + 1)
            self.assertTrue(isinstance(meta, dict))
            self.assertEquals(meta['hits']['total'], self._total_docs)
dataset/ETHPy150Open wingify/superelasticsearch/tests/test_superelasticsearch.py/TestItersearch.test_chunked_itersearch_with_meta_returns_meta/original