Store: Search, Remove common words from author matching.

This commit is contained in:
John Schember 2012-11-18 16:44:47 -05:00
parent d129c1d81f
commit cdcf297829

View File

@ -448,7 +448,7 @@ class SearchFilter(SearchQueryParser):
vals = accessor(sr).split(',')
elif locvalue == 'author2':
m = self.IN_MATCH
vals = accessor(sr).replace(',', ' ').split(' ')
vals = re.sub(r'(^|\s)(and|not|or|a|the|is|of|,)(\s|$)', ' ', query).split(' ')
else:
vals = [accessor(sr)]
if self._match(query, vals, m):