[Zope-CMF] Topic ANDing
Tres Seaver
tseaver@palladion.com
Wed, 12 Sep 2001 08:57:58 -0400 (EDT)
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