Playing around with Zopes ZCatalog

Today I am working a bit on some autocompletion feeding for our cts system. First I am playing around TextIndexNG3: * You can have multiple fields indexed, and query them seperately * It seems to be possible to find out what words are in the Index catalog.Indexes\'fulltext\'.index.getLexicon().getWordsForSubstring('foo') * But it does not work ttw * Therefore I have to write some trusted code (thanks AJung) * I could not use ExternalMethods (they are not properly synced with my version of FileSystemSite) * Therefore I put some stuff in my Products __ini__.py: from AccessControl import ModuleSecurityInfo ModuleSecurityInfo('Products').declarePublic('CTS') ModuleSecurityInfo('Products.CTS').declarePublic('callLexicon') def callLexicon(catalog,indexname,method,*args,**kwargs): lexicon =catalog.Indexesindexname.index.getLexicon() return getattr(lexicon,method)(*args,**kwargs) * I don't get however why the Securitydeclarations have to be done that way