

def test_mlt_on_foo_with_filter(self):
    'Verify MLT with the foo field while filtering on tag.'
    mlt = MLT(1, self.get_s().filter(tag='boring'), ['foo'], min_term_freq=1, min_doc_freq=1)
    eq_(len(mlt), 2)
    mlt = MLT(1, self.get_s().filter(tag='elite'), ['foo'], min_term_freq=1, min_doc_freq=1)
    eq_(len(mlt), 1)
    mlt = MLT(1, mlt.get_s().filter(tag='awesome'), ['foo'], min_term_freq=1, min_doc_freq=1)
    eq_(len(mlt), 1)
    mlt = MLT(1, self.get_s().filter(tag='gross'), ['foo'], min_term_freq=1, min_doc_freq=1)
    eq_(len(mlt), 0)

dataset/ETHPy150Open mozilla/elasticutils/elasticutils/tests/test_mlt.py MoreLikeThisTest.test_mlt_on_foo_with_filter/VarMisuse@102/158 `self`->`mlt`