Commit 441f2439 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Added searchable text support


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5368 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e3202408
......@@ -77,4 +77,18 @@ class Document(XMLObject, TextContent):
__implements__ = ()
# Patch
PUT = TextContent.PUT
\ No newline at end of file
PUT = TextContent.PUT
### Content indexing methods
security.declareProtected(Permissions.View, 'getSearchableText')
def getSearchableText(self, md=None):
"""\
Used by the catalog for basic full text indexing
We should try to do some kind of file conversion here
"""
searchable_text = "%s %s %s %s" % (self.getTitle(), self.getDescription(),
self.getId(), self.getTextContent())
return searchable_text
# Compatibility with CMF Catalog / CPS sites
SearchableText = getSearchableText
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment