[Zope-Coders] Proposal for minor ZCatalog improvement

Lennart Regebro lennart@torped.se
Sat, 9 Nov 2002 14:16:05 +0100


+1
----- Original Message ----- 
From: "Andreas Jung" <andreas@andreas-jung.com>
To: <zope-coders@zope.org>
Sent: Saturday, November 09, 2002 10:45 AM
Subject: [Zope-Coders] Proposal for minor ZCatalog improvement


> All ZCatalog indexes are using the id of the indexes to index attributes
> with the same name. ZCTextIndex introduced a new approach by seperating
> the id of the index from the attribute name to be indexed. This is a nice
> idea and allows to have different indexes on the same attribute name
> (e.g. having a FieldIndex and a text index on a string attribute).
> 
> I propose add this functionality to all Zope indexes. All interface for
> pluggable indexes should get a new method getIndexedAttribute() that
> returns the name of the attribute that will be indexed by this index.
> The indexes tab of the ZCatalog should be modified to display the
> indexes as:
> 
> topic_txt  (TextIndex on topic) ...
> topic_field (FieldIndex on topic)
> 
> For backwards compatiblity getIndexedAttribute() would  return the
> id of the index if the indexes has no dedicated attribute to keep
> the name of the indexed attribute.
> 
> Cheers,
> Andreas
> 
>     ---------------------------------------------------------------------
>    -    Andreas Jung                     http://www.andreas-jung.com   -
>   -   EMail: andreas at andreas-jung.com                              -
>    -            "Life is too short to (re)write parsers"               -
>     ---------------------------------------------------------------------
> 
> 
> _______________________________________________
> Zope-Coders mailing list
> Zope-Coders@zope.org
> http://lists.zope.org/mailman/listinfo/zope-coders
>