[Zope-CMF] Topic ANDing

Meilicke, Scott scott.meilicke@intp.com
Wed, 12 Sep 2001 08:09:14 -0700


You mean I have to *program* to do this? :)  Looks like I'll be dusting off
my Learning Python book.  I probably should have done that long ago.  Thanks
Tres, sounds like an interesting project.

Another means that may be useful in my particular case is shown in the
workgroup FAQ mentioned on the zope list today,
http://cmf.zope.org/doc/FAQ/permissions/faq7.  One example given is to have
a separate list of allowable subjects for each workgroup, which is another
way to get what I'm after.  I'll have to think about the merits of both
approaches.

Scott

-----Original Message-----
From: Tres Seaver [mailto:tseaver@palladion.com]
Sent: Wednesday, September 12, 2001 5:58 AM
To: Meilicke, Scott
Cc: zope-cmf@zope.org
Subject: Re: [Zope-CMF] Topic ANDing


On Mon, 10 Sep 2001, Meilicke, Scott wrote:

> I'd like my topics to be able to AND instead of OR.  Per this message:
> 
>
http://zope.nipltd.com/public/lists/ptk-archive.nsf/2f80d8dcfde6f195802568c1
>
00635ff4/2d170476f956835e80256a4f0051f9e3?OpenDocument&Highlight=2,criteria
> 
> zope 2.4.0 should have the ability to do so via a 'drop in index'.  Does
> anyone know how I can use this feature?  I'm using zope 2.4.0 and CMF 1.1.

> 
> More detail:
> 
> doc1: subject="market", "competition"
> doc2: subject="market", "industry"
> 
> topic1 criteria:"market", "competition"
> topic2 criteria:"market", "industry"
> 
> I would like doc1 to show up in only topic1, and doc2 to show up only in
> topic2.  I'd rather not use subtopics for this.

What you require is not a "drop-in index";  standard keyword indexes
(of which the Subject index is one) have this feature, but the
CMFTopic.ListCriterion does not expose it.  We would need to add
a property to ListCriterion to track the "operator" desired, and
then modify its 'getCriteriaItems' method to add that value, using
field + "_operator" as its key.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com