Multiple versions of same documents with different effective dates

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Multiple versions of same documents with different effective dates

Susheel Kumar-3
Hello,

I am trying to keep multiple versions of same document (empId,
empName,deptID,effectiveDt,empTitle..,..) with different effective dates
(composite key: deptID,empID,effectiveDt) but mark/ soft delete (deleted=Y)
the older ones and keep deleted=N for the latest one.

This way i can query the latest one (....AND deleted=N) and if required
show all of them.

I am thinking to do this in processAdd / ScriptUpdateProcessor and query
Solr to first see if there is any existing record with deptID,empID and
then update those with deleted=Y and then process new one with deleted=N.

Any suggestions or issues you see with this approach?

Thanks,
Susheel

P.S.  I need to figure out how update another document same time
in processAdd