fix text search in non db case
This commit is contained in:
parent
38f3e49e7a
commit
9e5404f307
|
@ -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'
|
||||
|
|
Reference in New Issue