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:
parent
92f6a06e01
commit
8cd89c7ff1
1 changed files with 5 additions and 5 deletions
10
query.py
10
query.py
|
@ -103,17 +103,17 @@ class FullQuery(BaseQuery):
|
||||||
return result
|
return result
|
||||||
if text or type != 'loops:*': # TODO: this may be highly inefficient!
|
if text or type != 'loops:*': # TODO: this may be highly inefficient!
|
||||||
cat = self.catalog
|
cat = self.catalog
|
||||||
if useFull and text:
|
|
||||||
criteria = {'loops_text': text}
|
|
||||||
r1 = set(cat.searchResults(**criteria))
|
|
||||||
else:
|
|
||||||
r1 = set()
|
|
||||||
if type.endswith('*'):
|
if type.endswith('*'):
|
||||||
start = type[:-1]
|
start = type[:-1]
|
||||||
end = start + '\x7f'
|
end = start + '\x7f'
|
||||||
else:
|
else:
|
||||||
start = end = type
|
start = end = type
|
||||||
criteria = {'loops_type': (start, end),}
|
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:
|
if useTitle and text:
|
||||||
criteria['loops_title'] = text
|
criteria['loops_title'] = text
|
||||||
r2 = set(cat.searchResults(**criteria))
|
r2 = set(cat.searchResults(**criteria))
|
||||||
|
|
Loading…
Add table
Reference in a new issue