[Zope-CMF] 2nd Part: Problem with AND expression in searchResult() method?

Jürg Luthiger juerg.luthiger@freesurf.ch
Thu, 29 Aug 2002 21:07:12 +0200


While debugging CMFTopic I found the solution to my problem. The query is:

form_results python:request.get('links',
here.portal_catalog.searchResults( meta_type = 'Portal File'

, Subject = (thisContext, 'form')

, Subject_operator = 'and'

, review_state = 'published' ));

Juerg

----- Original Message -----
From: "Jürg Luthiger" <juerg.luthiger@freesurf.ch>
To: <zope-cmf@zope.org>
Sent: Thursday, August 29, 2002 6:05 PM
Subject: [Zope-CMF] 2nd Part: Problem with AND expression in searchResult()
method?


> To clarify my problem:
>
> 1. I have an object with two Subjects ('humanresmgmt', 'form', '') and =
I
> have other objects with just one of those two defined.
>
> 2. I want to search in the catalog for this object with ('humanresmgmt'=
,
> 'form', '') only
>
> 3. I thought that using an AND construct for the Subject-key would solv=
e
> it
>
> 4. I started to form this expression for example:
>
> form_results python:request.get('links',
>    here.portal_catalog.searchResults( {'meta_type':'Portal File'
>    , 'Subject': 'form AND humanresmgmt'
>    , 'review_state': 'published'} ));
>
> 5. But I didn't manage to get it working. Whatever I tried the result
> was
> either a TALES error or the query returned nothing.
>
> 6. I went through the docus on the internet and through other resources=
,
> but
> couldn't find an example or solution to my problem yet.
>
> I would appreciate any hints!
>
> Thanks, Juerg
>
>
>
>
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF@zope.org
> http://lists.zope.org/mailman/listinfo/zope-cmf
>
> See http://collector.zope.org/CMF for bug reports and feature requests
>