Re: Lucene Product Suite

Christian Klinger <[email protected]>
Newsgroups gmane.comp.web.zope.cps.devel
Message-ID <[email protected]>
Julien Anguenot schrieb:
> Hi !
> 
> Christian Klinger wrote:
>> Hi agin i´ve found the error i used PyLucene Version (2.07). Now i use
>> 1.9.1 and all works fine so far.
> 
> oki it explains. As well, to test your PyLucene / installation you can
> do two things.
> 
>  - run PyLucene tests (make test within the source folder of PyLucene
>  - run NXLucene tests from NXLucene dir (./tests.py -v -s nxlucene)
> 
> You should not get any errors on both test suites. Like this you can be
> really confident your NXLucene server is running well.
> 
> 
>> This means: i can index my Plone-Site. (I see the contents in
>> luke-java-client.)
> 
> ok great.
> 
> 
>> I can search in script...
>>
>> ******************************
>> a=container.portal_catalog
>> print a
>>
>> kw={'portal_type': ['Document', 'Event', 'Favorite', 'File', 'Folder',
>> 'Image', 'Large Plone Folder', 'Link', 'News Item', 'Topic'], 'sort_on':
>> 'modified', 'sort_order': 'reverse', 'sort_limit': 5}
>>
>> rec=a.searchResults(**kw)
>> print rec
>> for x in rec:
>>     print x.Title
>>     print x.Creator
>>     print x.ModificationDate
>> return printed
>> *************************************
>>
>> But if i try to access x.ModificationDate i got the following error:
>>
>> 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 10, in BB
>>    - <PythonScript at /AA/BB>
>>    - Line 10
>> AttributeError: ModificationDate
>> I have registered ModifcationDate in the SchemaTab of my
>> PloneLuceneCatalog Instance in ZMI.

Hi i don´t understand the meaning of the SchemaTab in ZMI. Can you 
explain that?

If i understand you right i have to add the field ModificationDate in 
the List of Fields? It has nothing to do with the Schema Tab in ZMI?

> 
> Can you see the ModificationDate within the Lucene store ? If you added
> it afterwords, don't forget to reindex the whole Plone site because some
> of the documents might be missing this field. (I guess you reimplemented
> the method reindexAllProcies() we add within CPSLuceneCatalog for your
> plone site right ?
> 

I ´ve alreade done this...

>> How can i access the ModificationDate?
> 
> This should be the way if everything is well configured.
> 
>> Question 2:
>>
>> If i enable these two lines in searchResults Methode
>>
>>   user = _getAuthenticatedUser(self)
>>   kw[ 'allowedRolesAndUsers' ] = self._listAllowedRolesAndUsers(user)
>>
>> my query looks like this:
>>
>>    ({'id': 'allowedRolesAnsUsers', 'value': ['Manager', 'Authenticated',
>>      'Anonymous', 'user:cklinger']}, {'id': 'portal_type', 'value':
>>      ['Document', 'Event', 'Favorite', 'File', 'Folder', 'Image', 'Large
>>      Plone Folder', 'Link', 'News Item', 'Topic']})
>>
>> The Value in Luke for allowdRolesAndUsers looks like this:
>>
>>    Manager#Authenticated#Anonymous
> 
> You are using an old version of NXLucene I think ? Use the latest one :
> http://www.cps-project.org/sections/projects/nxlucene/downloads/nxlucene-0-9-3
> 

Yes i think i use 0-9-1

> Don't forget to reindex the whole site because the way indexes are
> stored changed.
> 
>> without any user:cklinger string.
>>
>> Is this correct?
> 
> nope try the new version, reindex and keep us posted :)
> 
> 	J.
> 
Thx Christian

_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.