<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>&quot;&quot;&quot;</div>
<div>The adapter &quot;SearchableTextAdapter&quot; adapts the interface &quot;IFile&quot; to the interface </div>
<div>&quot;ISearchableText&quot;. Based on Frank's 'adapter.py'.</div>
<div>&quot;&quot;&quot;</div>
<div>&nbsp;</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>&nbsp;</div>
<div>class SearchableTextAdapter:</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; implements(ISearchableText)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; adapts(IFile)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; def __init__(self, context):</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.context = context</div>
<div>&nbsp;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; def getSearchableText(self):</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return self.context.data</div>
<div>&nbsp;</div>
<div>------------------------------------------------------------------------------------------------------</div>
<div>configure.zcml </div>
<div>------------------------------------------------------------------------------------------------------</div>
<div>&lt;adapter</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; factory = &quot;.adapter.SearchableTextAdapter&quot;</div>
<div>/&gt;</div>
<div>&nbsp;</div>
<div>------------------------------------------------------------------------------------------------------</div>
<div>&nbsp;</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 &quot;ZPT pages&quot;, 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>&nbsp;</div>
<div>Will somebody please suggest me a solution fro this problem.</div>
<div>Thanks</div>
<div>-- <br>Sreeram Nudurupati </div>