[Zope-dev] Catalog Text Indexing

Bjorn Stabell bjorn@exoweb.net
Wed, 14 Nov 2001 16:58:21 +0800


I find it quite handy that it acquires the value.  I often define
"global" methods that I call in an acquired way.  For instance one could
be "MainTitle" which returns a part of the Title only (used to make
heads and subheads out of one Title).

> -----Original Message-----
> From: Terry Kerr [mailto:terry@bizarsoftware.com.au]
> Posted At: Wednesday, November 14, 2001 15:04
> Posted To: Zope Developer
> Conversation: [Zope-dev] Catalog Text Indexing
> Subject: [Zope-dev] Catalog Text Indexing
>=20
>=20
> Hi,
>=20
> Is there any particular reason that a Text Index will index=20
> an object by
> acquiring the value to index?  Shouldn't it not index at all if the
> value doesn't exist on the object?
>=20
> The only way I can get my objects to not be indexed if they don't have
> the indexing attribute is to set the attribute to None, reindex, then
> remove the attribute.  By make this simple change to
> lib/python/Products/PluginIndexes/TextIndex/TextIndex.py
>=20
>=20
> 353c353,354
> <             source =3D getattr(obj, self.id)
> ---
> >             from Acquisition import aq_base
> >             source =3D getattr(aq_base(obj), self.id)
>=20
> The object is only indexed if the value exists on that object.  This
> fixes my problem.
>=20
> I believe KeyWord Indexes have the same problem
>=20
> Terry
>=20
>=20
>=20
>=20
> --=20
> Terry Kerr (terry@bizarsoftware.com.au)
> Chief Technical Officer
> Bizar Software Pty Ltd (www.bizarsoftware.com.au)
> Phone: +61 3 9563 4461
> Fax: +61 3 9563 3856
> ICQ: 79303381
>=20
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -=20
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>=20