[Zope-CMF] Re: [HELP] Re : Metadata & portal_catalog

Tres Seaver tseaver@zope.com
Mon, 25 Mar 2002 08:49:08 -0500 (EST)


On Mon, 25 Mar 2002, [ISO-8859-1] Fr=8Ed=8Eric Lemaitre wrote:

>=20
> Hello,
> Thanks for all your responses.
> But, i'v still a problem :
>=20
> - I have done and index "Compagny" on my portal_catalog =3D=3D> Ok
> - I have made my own 'full_metadata_edit_form' to modify "Compagny" val=
ue
> =3D=3D> Ok
> - I have made my own 'search_form' in order to query portal_catalog on
> "Compagny" field =3D=3D> Ok
> - I have reindex the portal_catalog =3D=3D> Ok
>=20
> But, is it possible to automaticaly catalog my objects when i add a new
> one ?
> Cause, when i add an object whith the "Compagny" property, or when i
> change the value of "Compagny" property, the Catalog isn't updated. Nor=
mal
> ? In fact, i have to manually reindexe the catalog in order to find my
> objects....
>=20
> For that, i find : portal_catalog.catalog_object(my_obj, uid) method. B=
ut,
> what is "uid" ?
> What value do i must set to "uid" ?

If your content object's class derives from PortalContent, then you
should be able to call 'self.reindexObject' after changing the Company
value.

Tres.
--=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.org