[Product-Developers] how to prevent portal_catalog from indexing acquisition values?
Andreas Jung
lists at zopyx.com
Fri Apr 17 16:48:14 UTC 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 17.04.2009 15:37 Uhr, Kees Hink wrote:
> I have a field 'performance_code', which i want to create catalog indexes for.
>
> Problem is that objects contained in objects of my content type will acquire the
> value of its parent, so catalog queries for 'getPerformance_code' will also
> return brains for objects which don't actually have that field.
>
> I tried setting 'index_method = context.aq_explicit().performance_code' in the
> schema, to no effect.
>
> What to do?
>
Create a method foo() within your class and create an index called
'foo'. Within foo() you can add your code taking care about acquisition.
- -aj
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAknoss0ACgkQCJIWIbr9KYyspACdH7bmT4GjRtXBBZiH5e0ywmdR
DskAniGIFaXX0ROHsolfjDiQKFfi6Nby
=o23g
-----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/20090417/71fd5374/attachment.vcf>
More information about the Product-Developers
mailing list