[Zope-dev] Catalog Text Indexing
Terry Kerr
terry@bizarsoftware.com.au
Wed, 14 Nov 2001 18:03:40 +1100
Hi,
Is there any particular reason that a Text Index will index an object by
acquiring the value to index? Shouldn't it not index at all if the
value doesn't exist on the object?
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
353c353,354
< source = getattr(obj, self.id)
---
> from Acquisition import aq_base
> source = getattr(aq_base(obj), self.id)
The object is only indexed if the value exists on that object. This
fixes my problem.
I believe KeyWord Indexes have the same problem
Terry
--
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