Dear All,
 
I managed to add a property to an object by using the manage_addproperty () method.
 
However, if I don't issue a manage.reindexIndex () for the new property, it won't come out in the catalog search results.
 
So I issue reindexIndex (), but when I finally try to display the property, all I get is 'Missing Value'.
 
But if I then issue the command refreshCatalog(clear=1), the property is now visible. Although refreshCatalog works, it would gobble up the server's CPU and memory resources everytime its run.
 
My question is, is there another command I can use instead of refreshCatalog to make the property display ?
 
Below is the code I'm talking about :
 
wf = context.GeneralWorkflow
instance_id = wf.addInstance( process_id=process, customer=jobname, comments=comment, title=subject, activation=1)
wf.getInstance(instance_id).manage_addProperty('jobname', 'ABC12345', 'string')
wf.Catalog.manage_reindexIndex(ids=['jobname'], REQUEST=None, RESPONSE=None, URL1=None)
 
jobs = cat.searchResults({'jobname':'ABC12345'})
 
for j in jobs:
    print j.jobname
 
 
 
Regards,
Danny
 
_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to