[Zope3-Users] Integrating text indexing engine into Zope 3
Frank Burkhardt
fbo2 at gmx.net
Fri Apr 28 11:38:02 EDT 2006
Hi,
On Fri, Apr 28, 2006 at 02:29:51PM +0200, Achim Domma wrote:
> Hi,
>
> I want to integrate support for a specialized text indexing engine into Zope 3. The engine is able
> to provide documents which are "similar" to a reference document.
I'm curious: How are you going to do this (comparing documents, determining similiarity)?
> First I had a look at ICatalog, but IInjection seems to be the way to go. Could somebody give me a
> high level overview on how to use / implement these interfaces?
>
> I currently think about the following steps:
>
> - Implement the index as local utility.
> - Define an interface IMyStorageDocument for documents to be stored in my index.
> - Capture somehow if objects are created or deleted. Check if the object can be adapted to
> IMyStorageDocument. If yes, store it in the index or remove it.
You should have a look at zope.app.catalog.interfaces.IAttributeIndex which
seems to be what you want. Write your own implementation of an index
implementing IAttributeIndex. Your index will later be created as a child of
an ICatalog object which will take care of created, modified or deleted
content objects on your server and tell all its indices (-subobjects) about
those changes.
> Clients then only have to implement an adapter for documents which should
> be indexed. To search for documents one could access the index as local
> utility.
This is basically what I did: I wrote an interface providing 3 methods that are
used by my index: getTitle(), getContent(), getAbstract().
hth
Regards,
Frank
More information about the Zope3-users
mailing list