def search_notemodel(self, note_model):
        content_words = note_model.wordset
        try:
            content_tags = note_model.metadata['tags']
        except (__HOLE__, TypeError):
            content_tags = ''

        has_tag_filters = len(self.use_tags + self.ignore_tags) > 0  # are there tags in the search term
        has_word_filters = len(self.use_words + self.ignore_words) > 0  # are there words in the search term

        yay_tags = all([tag in content_tags for tag in self.use_tags]) if has_tag_filters else True
        boo_tags = all([tag not in content_tags for tag in self.ignore_tags]) if has_tag_filters else True
        yay_words = all([word in content_words for word in self.use_words]) if has_word_filters else True
        boo_words = all([word not in content_words for word in self.ignore_words]) if has_word_filters else True

        return all([yay_words, boo_words, yay_tags, boo_tags])
dataset/ETHPy150Open akehrer/Motome/Motome/Models/Search.py/SearchModel.search_notemodel