<div>Hi all,</div>
<div>Thanks to Frank and Brend, I have successfully crated a catalog and indexed ZPTpages.</div>
<div>Then I wanted to index text files and PDF files, so wrote an adapter like this:</div>
<div>-----------------------------------------------------------------------------------------------------------------</div>
<div>adapter.py</div>
<div>-----------------------------------------------------------------------------------------------------------------</div>
<div>"""</div>
<div>The adapter "SearchableTextAdapter" adapts the interface "IFile" to the interface </div>
<div>"ISearchableText". Based on Frank's 'adapter.py'.</div>
<div>"""</div>
<div> </div>
<div>from zope.index.text.interfaces import ISearchableText</div>
<div>from zope.component import adapts</div>
<div>from zope.interface import implements</div>
<div>from zope.app.file.interfaces import IFile</div>
<div> </div>
<div>class SearchableTextAdapter:</div>
<div> implements(ISearchableText)</div>
<div> adapts(IFile)</div>
<div> </div>
<div> def __init__(self, context):</div>
<div> self.context = context</div>
<div> </div>
<div> def getSearchableText(self):</div>
<div> return self.context.data</div>
<div> </div>
<div>------------------------------------------------------------------------------------------------------</div>
<div>configure.zcml </div>
<div>------------------------------------------------------------------------------------------------------</div>
<div><adapter</div>
<div> factory = ".adapter.SearchableTextAdapter"</div>
<div>/></div>
<div> </div>
<div>------------------------------------------------------------------------------------------------------</div>
<div> </div>
<div>After doing this I restared Zope3 and then went to the Zope3 manager and added a new text file.</div>
<div>Initially the only files being indexed were "ZPT pages", but after writing the adapter even text files were being indexed. </div>
<div>However the problem is that when I try to add a PDF of Word documents, the files are not being indexed and showing an error that cannot decode files.</div>
<div> </div>
<div>Will somebody please suggest me a solution fro this problem.</div>
<div>Thanks</div>
<div>-- <br>Sreeram Nudurupati </div>