I want to index a field from an object, which works perfectly via Catalog and
Field Index.

But if my callable field returns a value, which is returned from an adapter of
the object, things get complicated for me:

i create my object an add it to a container (not via zmi).
i do the notify(ObjectCreatedEvent(container[myobjectname]) thing, to let the
intid and catalog do their indexing stuff.
i look at the Catalog statistics in the zmi, where is see, that one item is 
but when i delete the object (i used
notifiy(ObjectRemovedEvent(container[myobjectname])), there is still something
residing in the index, which causes a KeyError in the intid utility, when it
trys to getObject.

It seems, that the index is indexing the object and the adapter via the same
unique intid, and then deletes only the objects index, and not the adapter?

since my adapter is only accessing annotations on the object, i could feed the
index directly via the annotation value, but that goes against the use of
adapters and the idea, not to change the object implementation.

Do you have any idea, what i have to do?
Did i forget an event? or something else?

cheers Dominique
Zope3-users mailing list

Reply via email to