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:[EMAIL PROTECTED]]
> Posted At: Wednesday, November 14, 2001 15:04
> Posted To: Zope Developer
> Conversation: [Zope-dev] Catalog Text Indexing
> Subject: [Zope-dev] Catalog Text Indexing
> 
> 
> 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 )
> 

_______________________________________________
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