def test_size_multi(self):
        q = TermQuery("name", "bill")
        resultset_single = self.conn.search(query=q, indices=self.index_name)
        self.assertEqual(resultset_single.total, 2)

        s = Search(query=q, size=1)
        resultset_multi = self.conn.search_multi([s], indices_list=[self.index_name])
        resultset_multi._do_search()

        num_curl_requests = self._compute_num_requests()

        self.assertTrue(resultset_multi.valid)
        self.assertEqual(len(resultset_multi[0].hits), 1)
        self.assertIn(resultset_multi[0][0], resultset_single)

        # no curl requests should have been triggered when doing
        # resultset_multi[0][0]
        self.assertEqual(num_curl_requests,
                         self._compute_num_requests())

        # make sure that getting more than 'size' elements triggers
        # an ES request
        self.assertIn(resultset_multi[0][1], resultset_single)
        self.assertLess(num_curl_requests-1,
                        self._compute_num_requests())
Return 'rootObject' as a plist-formatted string.
dataset/ETHPy150Open aparo/pyes/tests/test_multisearch.py/MultiSearchTestCase.test_size_multi--crossover with--dataset/ETHPy150Open grahamgilbert/Crypt/Crypt/FoundationPlist.py/writePlistToString