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 ([EMAIL PROTECTED])
Chief Technical Officer
Bizar Software Pty Ltd (www.bizarsoftware.com.au)
Phone: +61 3 9563 4461
Fax: +61 3 9563 3856
ICQ: 79303381

_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to