[ZODB-Dev] Using ZCatalog outside Zope?
Dieter Maurer
dieter at handshake.de
Fri Apr 2 17:11:20 EST 2004
pm5 at matilda.fiorile.org wrote at 2004-4-2 15:25 +0800:
> ...
>But ZCatalog is not a standalone product like ZODB. Although the
>[2]tutorial mensioned that most of the indexing work resides in
>module Catalog, it still depends on Acquisition, ExtensionClass,
>zLOG, such and such, so I cannot import it directly.
>
> 2. http://www.zope.org/Documentation/How-To/ZCatalogTutorial
>
>
>So can anyone give me a hint, should I try to adapt ZCatalog to
>a non-Zope environment, or should I leave it and go build my own
>indexing layer?
The ZODB code, too, needs some of the above packages (e.g. "ExtensionClass").
I would give "ZCatalog" whatever it needs.
The only nasty thing (in my view) is that adding an index
depends on Zope's product registry.
I see several options:
1. "ZopeTestCase" comes with a utility to register individual
products. Use it to register precisely the products
required for indexing.
2. Extend the ZCatalog-API by a method adding a pre-build index
3. Add the index directly to "ZCatalog._catalog".
--
Dieter
More information about the ZODB-Dev
mailing list