Re: [Zope-dev] Catalog Text Indexing

2001-11-14 Thread Lennart Regebro

From: "Terry Kerr" <[EMAIL PROTECTED]>
> 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?

If the value is aquired, then it means that this object has that value,
aquired. I find it logical that the indexing will behave like that too, and
I'm pretty sure I have used it in some application.

> I believe KeyWord Indexes have the same problem

Why is it a problem? It sounds like a feature to me. :-)
If you have an attribute that you don't want to be aquired, I guess you have
to make a computed attribute out of it.



___
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 )



RE: [Zope-dev] Catalog Text Indexing

2001-11-14 Thread Bjorn Stabell

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 )