diff --git a/tabellio/searchform/form.py b/tabellio/searchform/form.py index 8179c65..fb199b1 100644 --- a/tabellio/searchform/form.py +++ b/tabellio/searchform/form.py @@ -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'