Re: Re: Lucene Product Suite
Julien Anguenot <[email protected]>
| Newsgroups | gmane.comp.web.zope.cps.devel |
|---|---|
| Organization | NUXEO |
| Message-ID | <[email protected]> |
Christian Klinger wrote:
> Julien Anguenot schrieb:
>
>> nope use MultiKeyword instead. (check the default CPS configuration)
>>
>> See :
>> http://svn.nuxeo.org/trac/pub/browser/CPS3/products/CPSLuceneCatalog/trunk/profiles/default/lucenecatalog.xml
[...]
> Ok this works now fine. I´ve also enabled
> ExtensibleIndexableObjectWrapper and sorting "the Plone Way".
ok great.
> Now i have a new Problem with the CPSBrain i think.
>
> With ZCatalog it is possible to call this funktion (pretty_title_or_id)
> on brain object.
>
> ################################
> a=container.portal_catalog
> b={'Creator':'cklinger'}
> res=a(b)
> res=res[0]
> print res
> print res.pretty_title_or_id()
> return printed
>
> --> Result
>
> <Products.ZCatalog.Catalog.mybrains object at 0x56c4600>
> Members
> ##################################
>
> If i try this with the LuceneCatalog i got the following:
>
> ##################################
> x = res[0]
> print x
> print x.getObject().pretty_title_or_id() <-- Works
> #print x.pretty_title_or_id() <-- don´t work
>
> return printed
>
> --> Result
>
> <CPSBrain at /NP/events/previous>
> Past Events
> ####################################
>
> If i uncomment the x.pretty_title_or_id() i got this traceback.
>
> Traceback (innermost last):
> Module ZPublisher.Publish, line 115, in publish
> Module ZPublisher.mapply, line 88, in mapply
> Module ZPublisher.Publish, line 41, in call_object
> Module Shared.DC.Scripts.Bindings, line 311, in __call__
> Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
> Module Products.PythonScripts.PythonScript, line 325, in _exec
> Module None, line 14, in APR
> - <PythonScript at /NP/APR>
> - Line 14
> AttributeError: pretty_title_or_id
>
>
> Do you have an idea what todo?
> Maybe it would help to use the ZCatalogBrain Class ?
yes, you will have to extend the CPSBrain API. I's not fully compatible
with the ZCatalog API yet, as I wrote in one of my blogs. I currently
only backported the API I needed with CPS.
I'll be interested about your API extensions when you will be done, if
you don't mind :)
Is you code available within an svn repository ?
J.
--
Julien Anguenot | Nuxeo R&D (Paris, France)
Open Source ECM - www.nuxeo.com
CPS Platform - http://www.cps-project.org
Mobile: +33 (0) 6 72 57 57 66
_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel
signature.asc
(application/pgp-signature, 252 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEz1o0GhoG8MxZ/pIRAl8+AJ9iY5Q6jiJMYE8hz9PeXIejVDjMjgCffQlf UQH9b8juVZEDIeWV/NEOL3M= =1VYa -----END PGP SIGNATURE-----