[Zope] ZCatalog: finding a match "in" an index

Florent Guillaume fg@nuxeo.com
14 Dec 2001 10:02:27 GMT


When you go to the catalog Indexes, it says right there:

Field Indexes treat the value of an objects attributes atomically, and
can be used, for example, to track only a certain subset of object
values, such as 'meta_type'.

Keyword Indexes index a sequence of objects that act as 'keywords' for
an object. A Keyword Index will return any objects that have one or more
keywords specified in a search query.


So use a keyword index.


Florent


Jean Jordaan <jean@upfrontsystems.co.za> wrote:
> Hi all
> 
> Hopefully this one is a complete no-brainer ..
> 
> I have an index called 'AssignedTo', currently a FieldIndex, 
> containing lists like ['jean', 'isak']. I want to do a 
> selection based on this index::
> 
>   <dtml-let
>     brains="Reminders.getRemindersFiltered(
>               AssignedTo = AUTHENTICATED_USER.getUserName() )">
> 
> But that doesn't work. Is there a way to ask whether something
> is 'in' AssignedTo? Or would making AssignedTo a TextIndex
> solve my problem?


-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 10  http://nuxeo.com  mailto:fg@nuxeo.com