[Zope] ZCatalog'ing a Web Site

Michel Pelletier michel@digicool.com
Mon, 08 Nov 1999 14:51:43 -0500


Jeff Rush wrote:
> 
> On Mon, 08 Nov 1999 11:11:03 -0500, Michel Pelletier wrote:
> 
> >Jeff Rush wrote:
> >>
> >> So how is the zope.org site managed?  Do you run a cron
> >> job nightly to reindex the entire site?  That'd be quite a load
> >> especially on any site with gbytes of objects.  Hmm...
> >
> >The objects index/re-index/un-index themselves if they are created,
> >edited, or destroyed.  Thus, ZCatalog is used programatically.
> 
> Those that are ZCatalogAware, sure, but what about the basic
> Zope objects that aren't.  ExternalMethods, DTML*, and such
> don't inherit from ZCatalogAware so how are they kept up-to-date
> in the index?  Have they acquired special methods you've written
> that make them self-indexing?

Nope, they simply aren't used.  We punted on the idea of adding
catalogability to the stock Zope objects, it could break lots of stuff. 
Instead, we decided it would be better to develop the infrastructure to
develop catalog aware objects.  This is still pretty early in the game,
no set infrastructure has been realized yet.  Many of the elaborations
of the PTK address this issue.
 
> Also is there a time-saver option I can pass to the reindex operation
> that says *don't* reindex those objects that *are* ZCatalogAware?

Nope.  Perhaps the re-indexing machinery should ask the object how it
wants to be indexed/reindexed/unindexed.
 
> On casual inspection, I never see basic objects in the zope.org
> SiteIndex, as if you filter out little things like Images, ExternalMethods
> and such?  Is this true?

We don't filter them, they just aren't indexed in the first place. 
Since all the objects on the zope site catalog themselves (the 'Find'
tab is never used) non catalog ware objects are never cataloged.  The
Find tab is really a brute force way of doing things, programatic,
incrimental cataloging is much more efficient and easier to deal with.

> And lastly, does DC have any debugging tools for ZCatalog?  I've
> got a case where when I use the management_tab to reindex,
> objects are later found in the catalog, but when I do the same
> thing with a block of DTML code, the objects are _not_ found,
> however, they _are_ shown and counted when I use the two
> management tabs on the catalog.  I'd like to dump the indices
> and see how the two situations differ.  I clear the catalog btw
> each scenario.

Other than the ususal Python debugger, not really.  You are welcome to
hack up the 'status' tab to reflect any information you want.

-Michel

PS try to get those bug reports in before 2.1 goes final. ;)