collective.indexing

Abstract framework for queueing, optimizing and dispatching index operations for portal content.

Current release
collective.indexing 1.0

Released May 08, 2009 — tested with Plone 3

First final release.
More about this release…

Download fileGet collective.indexing for all platforms (20kB)
collective.indexing-1.0a1.tar.gz
Download fileGet collective.indexing for all platforms (41kB)
collective.indexing-1.0a1-py2.4.egg
Download fileGet collective.indexing for all platforms (43kB)
collective.indexing-1.0rc1.zip
Download fileGet collective.indexing for all platforms (46kB)
collective.indexing-1.0rc3.zip
Download fileGet collective.indexing for all platforms (48kB)
collective.indexing-1.0rc4.zip
Download fileGet collective.indexing for all platforms (60kB)
collective.indexing-1.0.zip

Project Description

collective.indexing

Introduction

collective.indexing is an approach to provide an abstract framework for queuing and optimizing index operations in Plone as well as dispatching them to various backends. The default implementation aims to replace the standard indexing mechanism of CMF to allow index operations to be handled asynchronously in a backwards-compatible way.

Queuing these operations on a transaction level allows to get rid of redundant indexing of objects and thereby providing a substantial performance improvement. By leveraging the component architecture and event system of zope3collective.indexing also makes it much easier to use backends other than or in addition to the standard portal catalog for indexing, such as dedicated search engine solutions like Solr, Xapian or Google Search Appliance. One backend implementation designed to be used with this package has already been started in the form of collective.solr.

If you are using CacheSetup make sure that you have CMFSquidTool 1.5 or later: older versions do not handle purge requests being generated during transaction commit and will produce internal errors.

Current Status

The implementation is considered to be ready for production. The package can be installed in a Plone 3.x site to enable indexing operations to be queued, optimized and dispatched to the standard portal catalog on the zope transaction boundary thereby improving the Plone's out-of-the-box performance. A sample buildout is provided for your convenience.

At the moment the package requires several "monkey patches", to the mixin classes currently used to hook up indexing, i.e. CMFCatalogAware (from CMF) and CatalogMultiplex (from Archetypes), the portal catalog as well as to helper methods in Plone itself. It is planned to clear these up by making the classes "pluggable" via adapterization, allowing collective.indexing to hook in in clean ways. At least two PLIPs will be proposed for inclusion into Plone 3.4.

In conjunction with collective.solr the package also provides a working solution for integration of Solr with Plone. Based on a schema configurable at zc.buildout level indexing operations can be dispatched a Solr instance in addition or alternatively to the standard catalog. This allows for minimal and very efficient indexing of standard Plone content items based on Archetypes. Providing support for other content types is rather trivial and will be support soon.

The code was written with emphasis on minimalism, clarity and maintainability. It comes with extensive tests covering the code base at more than 95%. The package is currently in use in several production sites and considered stable.

For outstanding issues and features remaining to be implemented please see the to-do list included in the package as well as it's issue tracker.

FAQs / Troubleshooting

"OFS.Uninstalled Could not import class '...' from module '...'" Warnings

Symptom

When loading your Plone site after a Zope restart, i.e. when browsing it, you're seeing warnings like:

WARNING OFS.Uninstalled Could not import class 'PortalCatalogQueueProcessor' from module 'collective.indexing.indexer'
WARNING OFS.Uninstalled Could not import class 'IndexQueueSwitch' from module 'collective.indexing.queue'
Problem
Early versions of the package used persistent local utilities, which are still present in your ZODB. These utilities have meanwhile been replaced and the old instances aren't needed anymore.
Solution
Please simply re-install the package via Plone's control panel or the quick-installer. Alternatively you can also use the ZMI "Components" tab on your site root object, typically located at http://localhost:8080/plone/manage_components, to remove the broken utilities from the XML. Search for "broken".

Credits

This code was inspired by enfold.indexing and enfold.solr by Enfold Systems as well as work done at the snowsprint'08. The TransactionManager pattern is taken from enfold.solr. Development was kindly sponsored by Elkjop.