Exemplo n.º 1
0
 def match_fulltext(self, article, query):
     for key in query:
         matching = False
         value = query[key]
         if isinstance(getByDot(article, key), str):
             if self.match_item2list(value, getByDot(article, key)):
                 matching = True
         if not matching:
             return False
         else:
             return True
Exemplo n.º 2
0
 def match_single(self, article, newid):
     matched_key = 'metadata.newid'
     if self.match_item2item(newid, getByDot(article, matched_key)):
         return True
     return False