Get Books: Fix title/author based query case-sensitive

Get Books: Fix searching using the title/author being case-sensitive and
therefore not returning results if uppercase characters were used in the
query.
This commit is contained in:
Kovid Goyal 2013-06-13 13:57:19 +05:30
parent 4e6a8ed649
commit 4787801c0d

View File

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