Hi Zopistas!

I have a funny situation here, where aparently the order in which
indexes are rebuilt during an object reindex introduces some random

There are 2 kinds of objects: jobs and documents. Documents are for
this example invoices that invoice one or multiple jobs. Each job can be
invoiced in zero, one or multiple invoices. Due to modelling the way
people work, the link is done from the document to the job, i.e. in the
document we store the IDs of jobs that are invoiced. The job can find
the documents that it's invoiced in via a Catalog search.

Each job needs a "most relevant invoice" date, if the job has 2
invoices, the date of the invoice with the highest amount is the "most
relevant" date. That's childs play. It gets put into a DateIndex.

The problem appears when reindexing either a job (on editing the job)
or when reindexing all the catalog: Apparently sometimes, the "most
relevant date" index gets calculated when the "job-to-document" index is
still empty. Result is that about 5-10% of "jobs" have an empty value in
the "most relevant date" index.

What strategies are you following for avoiding one index to depend on
another? Or am I doing something wrong and I'm the only one who got a
problem which seems to be angled on the order with which indexes are
emptied and reindexed?

Thanks for any hints!



Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to