From 8cd89c7ff17985a159cc836dc9ea06a85328d3a0 Mon Sep 17 00:00:00 2001 From: helmutm Date: Sun, 17 Sep 2006 11:17:38 +0000 Subject: [PATCH] fix query bug: check type also for full text search git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@1346 fd906abe-77d9-0310-91a1-e0d9ade77398 --- query.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/query.py b/query.py index fed9ee0..e6b7f42 100644 --- a/query.py +++ b/query.py @@ -103,17 +103,17 @@ class FullQuery(BaseQuery): return result if text or type != 'loops:*': # TODO: this may be highly inefficient! cat = self.catalog - if useFull and text: - criteria = {'loops_text': text} - r1 = set(cat.searchResults(**criteria)) - else: - r1 = set() if type.endswith('*'): start = type[:-1] end = start + '\x7f' else: start = end = type criteria = {'loops_type': (start, end),} + if useFull and text: + criteria['loops_text'] = text + r1 = set(cat.searchResults(**criteria)) + else: + r1 = set() if useTitle and text: criteria['loops_title'] = text r2 = set(cat.searchResults(**criteria))