fix text search in non db case

This commit is contained in:
Frédéric Péters 2011-12-01 13:06:46 +01:00
parent 38f3e49e7a
commit 9e5404f307
1 changed files with 6 additions and 2 deletions

View File

@ -773,8 +773,12 @@ class SearchView(BrowserView):
return []
if data.get('text'):
# plaintext search, get document ids from postgresql
kw['id'] = self.get_ids_from_postgres(data.get('text'))
portal = getToolByName(self.context, 'portal_url').getPortalObject()
if hasattr(portal, 'db'):
# plaintext search, get document ids from postgresql
kw['id'] = self.get_ids_from_postgres(data.get('text'))
else:
kw['SearchableText'] = data.get('text')
if data.get('search_type_is_document'):
kw['portal_type'] = 'tabellio.documents.document'