def test_terms_filter_1(self):
        f = filters.TermsFilter(values=[24], field='terms_filter')
        q = Search(filter=f)
        result = self.conn.search(query=q, indices=self.index_name,
                                  doc_types=[self.document_type])
        self.assertEqual(1, len(result.hits))

        f = filters.TermsFilter(values=[24, 25], field='terms_filter')
        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))

        f = filters.TermsFilter(values=[26], field='terms_filter')
        q = Search(filter=f)
        result = self.conn.search(query=q, indices=self.index_name,
                                  doc_types=[self.document_type])
        self.assertEqual(0, len(result.hits))
Without execution set
dataset/ETHPy150Open aparo/pyes/tests/test_filters.py/TermsFilterTestCase.test_terms_filter_1