Modified date of documents show future date

We have a database with an agent that every day must remove all the documents in the database and perform a new load.The load is approximately 40,000 documents and is readed from a text file.

The agent that does the job, remove all the documents from the database and after that, begins to read from the text file and write documents to the Notes database.

We have noticed that the modification date of documents increases as the documents saved increase, and becomes future date.

We have seen the post by Andre Guirard:

http://www-10.lotus.com/ldd/nd6forum.nsf/DateAllFlatWeb/d6e1f18415aa894b8525772f0078c32a?OpenDocument

but we can not imagine how we can workaround this problem.

What is the best way to remove and reload documents when the quantities of documents are large?

I appreciate any help.

Subject: Modified date of documents show future date

Again, it comes down to “don’t delete and re-create when you can modify and append”. Modified dates aren’t a problem; created dates are. As long as you want to purge all existing documents and start again, you are going to push the date/time forward to the future. There is approximately zero chance that all of your new data is completely unconnected to your old data, so update those documents that can be updated, delete only those that no longer serve any purpose, and create only those that are actually new.

Subject: RE: Modified date of documents show future date

Thanks Stan, I undestand your point and I agree with that, but “modify and append” is not an option in this case. The input file is generated for an external company and they are not able to detect the variations were in each document.

In this scenario, every day is a new story and the new documents don’t have any link with the old one.

My agent exec this task:

  1. save a flag field in each document present into the db.

  2. read all the lines in the input file .txt and save one document for each one

  3. if everything is ok, remove all the documents (removall(true)) that have the flag saved in point 1)

Finally, the creation date of the documents is right, the problem is the modified date, that is pushed forward to the future.

Thanks again.

Subject: RE: Modified date of documents show future date

“They” don’t have to know anything, since your agent can compare existing documents to the contents of the text file. Notes/Domino has a behaviour associated with document creation times AND THERE IS NO WORKAROUND.

Subject: RE: Modified date of documents show future date

Even if there really is no relationship between the old and new documents, you can still re-use them. First, change all your views so that their seleciton formula ends with & Form != “Reusable”. Then add one more view with selection formula Form = “Reusable”. In your code where you are currently deleting documents, change that to set Form=“Reusable” and delete all the other existing NotesItems. In your code that is importing the text file, instead of creating new documents, just read the next document out of the Reusable view, change the Form to whatever it needs to be and add the items as before. If the new text file is larger so you run out of reusable documents, your code can create documents as needed.

The other advantage of this is that you won’t be accumulating hundreds of thousands of deletion stubs, so your database’s performance will improve.