Skip to content

LearnOperate

Document versioning

Document versions

Treating a re-uploaded file as a new version of the same document, so search sees only the newest copy while older versions stay readable for a while.

In DocSlurpGlossary entry

On this page

Document versioning treats a re-uploaded file as a new version of an existing document rather than a second, separate document. Search and chat see only the newest version; older versions stay readable for reference and citations until a retention limit removes them.

Without it, re-uploading a corrected charter-agreement.pdf leaves two copies in the index. Ask how fast the jet is ready and you may get the old clause and the new one side by side, both cited, with nothing to say which is current.

How a version is recognized

The system needs a stable identity for “the same document”. Two common choices:

  • A caller-supplied ID, such as a URL or a path in your content system (/products, contracts/nda.pdf). Explicit and reliable.
  • Location: project plus folder path plus filename. Convenient for drag-and-drop uploads, but renaming a file starts a new chain.

Identical bytes are still a new version. Content-hash deduplication can share stored artifacts between them, but the upload is not skipped.

In DocSlurp

The version key is canonicalId when you supply one, otherwise a hash of the project, normalized folder path and filename. Only the current version is searchable. Retention defaults to 2 versions (current plus one earlier), configurable per organization or project from 1 to 100. A retained older version is archived: its pages and Markdown remain readable but its chunks and vectors are removed. Versions past the limit are purged. A citation opens the version it cites, and a document.replaced webhook fires when a new version takes over.

The gotcha

Versioning keys on identity, not content. Upload the same contract as nda-final.pdf and nda-final-v2.pdf and you get two live documents, not two versions. Supply a stable canonicalId when filenames can’t be trusted.

In DocSlurp

In DocSlurp

A document’s version key is its canonicalId, or a hash of project, folder path and filename. Search and chat see only the current version; retention keeps 2 versions by default, archives older ones and purges the rest. See core/docs/document-versions.md and the document.replaced webhook in core/server/src/lib/webhook-events.ts.

Sources

Jump to