[Product-Developers] Catalog search for a custom member type

Andreas Jung lists at zopyx.com
Tue Jan 13 10:29:47 UTC 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 13.01.2009 10:59 Uhr, SimO wrote:
> Hi all,
> 
> I have my custom member type (membrane+remember) which has a StringField
> named "categories"
> 
> and I need to filter my custom search on the content of this field.
> 
> I added index and metadata (both called "categories").
> 
> If I search for it with the basic Plone search, passing the category in
> the SearchableText index
> 
> I can find what I'm looking for but if I try to search passing the name
> of the field/index it doesn't work.
> 
> Here's the query that works: {'SearchableText': 'something', 'path':
> {'query': '/ic19'}, 'Type': 'MyMember'}
> 
> Here's the query that doesn't work: {'categories': 'something', 'path':
> {'query': '/ic19'}, 'Type': 'MyMember'

'categories' is what kind of index? Usually it should be a KEYWORD index
and likely you are supposed to query a keyword index with *sequence* of
strings and not with a string. Look at The Zope Book 2.7 edition for
further insight.

- -aj
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAklsbRsACgkQCJIWIbr9KYxRjQCg218VPvsgIeNLbRt8CSKO3hXE
zCoAn1+TK7xwjbpq0QEYWBHMXeHvOwj0
=pk4P
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lists.vcf
Type: text/x-vcard
Size: 316 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20090113/8f259c5a/attachment.vcf>


More information about the Product-Developers mailing list