ZCatalog for standalone ZODB
Jun 7, 2005 13:03 · 248 words · 2 minute read
I have just packaged up ZCatalog from Zope 3.1 for use with the standalone ZODB. I’m surprised that no one had released this previously, because all but the most trivial of ZODB apps will need some way to do non-primary key sorts of searches.
Previously available solutions that I spotted are: [IndexedCatalog](http://www.async.com.br/projects/IndexedCatalog/) and [these instructions for getting Zope 2.6’s ZCatalog working](http://slarty.polito.it:8069/~sciasbat/wiki/moin.cgi/StandaloneZodbHowto).
The major feature that ZCatalog has over IndexedCatalog is a full-text search index.
I had originally packaged up the Zope 2.8 catalog. That was generally working, but I wasn’t completely comfortable with it because the code was fairly “tangled up”. The Zope bits were spread throughout the code. Zope 3 has a beautiful architecture, and extracting the catalog from there was far easier.
Note, however, that this means that current ZCatalog plugins ([Dieter Maurer’s AdvancedQuery](http://www.dieter.handshake.de/pyprojects/zope/#AdvancedQuery), or [TextIndexNG](http://www.zopyx.com/OpenSource/TextIndexNG), for example) won’t work directly. Hopefully, it will not be difficult to get these sorts of things running. Generally speaking, that is left as an exercise to the reader (patches accepted 🙂
I’m calling this release 1.0 alpha 0, because the testing that I’ve done is approximately as extensive as what you see in the readme file. Which is to say that it passes the most basic of sanity checks, but I haven’t looked much beyond that. I’ll be exercising it a lot more this week, so I’ll probably have a bit more confidence later.
When it comes to developer tools, though, release early, release often is a good motto.