def test_ids_direct_type(self):
        f = filters.IdsFilter(values=[1, 2, 4])
        q = Search(filter=f)
        result = self.conn.search(query=q, indices=self.index_name,
                                  doc_types=[self.document_type])
        self.assertEqual(2, len(result.hits))
        self.assertItemsEqual([u'1', u'2'], [item._id for item in result.hits])
Doc type set in search
dataset/ETHPy150Open aparo/pyes/tests/test_filters.py/IdsFilterTestCase.test_ids_direct_type