[Zope-CMF] how to check whether an object is in a catalog
Kapil Thangavelu
k_vertigo at objectrealms.net
Sat Aug 7 20:43:42 EDT 2004
if catalog.getrid( '/'.join(object.getPhysicalPath() ):
return 'cataloged'
return 'not cataloged'
On Sat, 2004-08-07 at 00:19, robert rottermann wrote:
> Hi there,
> is there a way to check whether an object is indexed?
>
> I would like to dump the state of an object to disk. One of an objects
> attributes is the fact whether it is indexed or not.
>
> I thougth of using a catalog search like
> portal_catalog(path="/".join(list(obj.getPhysicalPath())), id=oj.getId())
>
> But this not general since I do not know for sure whether there is a
> path index. And it seems rather expensive.
More information about the Zope-CMF
mailing list