[Zope] ZCatalog dynamic indexing

Dieter Maurer dieter at handshake.de
Sun Nov 28 18:09:53 EST 2004


Garito wrote at 2004-11-27 16:05 +0100:
> ...
>I would know the security access for ALabel like:
>
>ObjectA
>    porpertyA
>       Label1:1:Everyone
>       Label2:1:Administrator
>       Label2:1:Users
>
>I would like to retrieve ObjectA if I ask for Label1 for Users
>
>You know what I mean?

No.

I might have understood had you asked for "Label1" or "Users"
or (maybe: "Label2 for Users") but "Label1 for Users" simply
does not fit with your example ;-)

Independent of language, your examples should be consistent...


I will try to give you some hints.

As you have a lines property, almost surely a KeywordIndex (maybe
more) is what you are looking for.

You have several options:

  *  A single KeywordIndex for "propertyA"

     -  indexing the triples

        this means, you must specify always triples.

	With a "Managable KeywordIndex" you can use
	pattern matching to replace missing parts by
	wildcards.

     -  indexing "label", "order", "access" separately

        This would allow you to ask for the parts separately.

	To work well, it would require that the names
	used in the different categories are different.

  *  several (Keyword) indexes for "propteryA", e.g. one
     index each for "label", "order" and "access".

-- 
Dieter


More information about the Zope mailing list