[Zope] ZCatalog attachments?

Aleksander Salwa ololo@zeus.polsl.gliwice.pl
Fri, 4 Aug 2000 16:06:07 +0200 (CEST)


On Fri, 4 Aug 2000, Simon Coles wrote:

> We have binary files stored in Zope, for example Word documents (but 
> could be any of a variety of document types).
> 
> We would like to be able to index and search the contents of these 
> files using ZCatalog. So if a Word file contains the word "Fred", 
> then any search for "Fred" would include that file in the list of 
> documents returned.
> 
> Is anyone doing something like this? If so, how....?
> 

Simple search in binary data of course won't do it, because of complex
format of Word documents. So:
Try to keep beside every document its 'rendered' version - converted to
plain text (created by saving them with Word in plain text format).
Then create class representing your document. This class should provide
parameterless method 'PrincipiaSearchSource' returning rendered version of
document. However, it's untested - but seems to be a step in right
direction ;)


ololo@zeus.polsl.gliwice.pl

/--------------------------------------\
| `long long long' is too long for GCC |
\--------------------------------------/