From cdcf2978296158779229b2d02aaaf2660edc49a3 Mon Sep 17 00:00:00 2001 From: John Schember Date: Sun, 18 Nov 2012 16:44:47 -0500 Subject: [PATCH] Store: Search, Remove common words from author matching. --- src/calibre/gui2/store/search/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/store/search/models.py b/src/calibre/gui2/store/search/models.py index 9c56c2cab0..3d24499e94 100644 --- a/src/calibre/gui2/store/search/models.py +++ b/src/calibre/gui2/store/search/models.py @@ -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):