[Zope] ZCatalog Related Questions

Evan Simpson evan@4-am.com
Thu, 3 Feb 2000 10:13:51 -0600


----- Original Message -----
From: James W. Howe <jwh@allencreek.com>
> One of the things I would like to do is have a full text search of all my
> articles.  However, it seems that the way I've structured things would
> require me to index all my DTMLMethods, whether they were contained in an
> article folder or not.  I can't seem to tell the system that I want to
> catalog only the DTMLMethods which are contained inside objects with a
> meta_type of 'Article', for example.

I think that a good way to handle this would be to give your Article ZClass
a 'PrincipiaSearchSource' method.  This method would read and return the
contents which you want indexed.  One side benefit of this is that you can
pre-process the contents to remove/replace stuff which you don't want in
your index.

PrincipiaSearchSource is the default method used to populate TextIndexes
(IIRC).

Cheers,

Evan @ 4-am