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
This commit is contained in:
helmutm 2006-09-17 11:17:38 +00:00
parent 92f6a06e01
commit 8cd89c7ff1

View file

@ -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))