Nuxeo mailing list archives
[CPS-devel] Re: Lucene Product Suite
Christian Klinger
cklinger at novareto.de
Tue Aug 1 15:34:39 CEST 2006
Julien Anguenot schrieb:
> Christian Klinger wrote:
>> Hi, thx for your answers.
>>
>>>> Yes i think i use 0-9-1
>> Now i use 0-9-3.
>>
>>> hum should be fine then. What kind of field and analyzer do you use for
>>> allowedRolesAndUsers ?
>>>
>> It was cool to have a matrix anything like that:
>>
>>
>> ZCATALOG | LuceneCatalog - Analizer
>> --------------------------------------------
>> TextIndex | Text - 'Standard'
>> KeywordIndex | Keyword - 'Standard'
>> ...
>>
>> For the allowedRolesAndUsers i use this statement:
>>
>> pcat.addField(name='allowedRolesAndUsers',attribute='allowedRolesAndUsers',type='Keyword',analyzer='Standard')
>
> 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
>
> J.
>
Hello Julien,
Ok this works now fine. I´ve also enabled
ExtensibleIndexableObjectWrapper and sorting "the Plone Way".
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 ?
thx Christian
More information about the cps-devel
mailing list
This list archive provided by Nuxeo, the
leaders of open source ECM.
Check out the Nuxeo 5 open source,
standards-based ECM project.