diff --git a/Documentation/5.3/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.cs b/Documentation/5.3/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.cs
index 1f79c1fa48..8ab0deeb5a 100644
--- a/Documentation/5.3/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.cs
+++ b/Documentation/5.3/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.cs
@@ -30,7 +30,7 @@ public ConfigRevisions()
// ------------------------
// * A revision will be created anytime a document is modified or deleted.
// * Revisions of a deleted document can be accessed in the Revisions Bin view.
- // * At least 100 of the latest revisions will be kept.
+ // * Only the latest 100 revisions will be kept. Older ones will be discarded.
// * Older revisions will be removed if they exceed 7 days on next revision creation.
// * A maximum of 15 revisions will be deleted each time a document is updated,
// until the defined '# of revisions to keep' limit is reached.
@@ -174,7 +174,7 @@ public async Task ConfigRevisionsAsync()
// ------------------------
// * A revision will be created anytime a document is modified or deleted.
// * Revisions of a deleted document can be accessed in the Revisions Bin view.
- // * At least 100 of the latest revisions will be kept.
+ // * Only the latest 100 revisions will be kept. Older ones will be discarded.
// * Older revisions will be removed if they exceed 7 days on next revision creation.
// * A maximum of 15 revisions will be deleted each time a document is updated,
// until the defined '# of revisions to keep' limit is reached.
diff --git a/Documentation/5.3/Samples/nodejs/document-extensions/revisions/client-api/operations/configureRevisions.js b/Documentation/5.3/Samples/nodejs/document-extensions/revisions/client-api/operations/configureRevisions.js
index 2308f8ad86..7ca11f5595 100644
--- a/Documentation/5.3/Samples/nodejs/document-extensions/revisions/client-api/operations/configureRevisions.js
+++ b/Documentation/5.3/Samples/nodejs/document-extensions/revisions/client-api/operations/configureRevisions.js
@@ -19,7 +19,7 @@ async function configureRevisions() {
// ------------------------
// * A revision will be created anytime a document is modified or deleted.
// * Revisions of a deleted document can be accessed in the Revisions Bin view.
- // * At least 100 of the latest revisions will be kept.
+ // * Only the latest 100 revisions will be kept. Older ones will be discarded.
// * Older revisions will be removed if they exceed 7 days on next revision creation.
// * A maximum of 15 revisions will be deleted each time a document is updated,
// until the defined '# of revisions to keep' limit is reached.
diff --git a/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/images/revisions_revisions-bin.png b/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/images/revisions_revisions-bin.png
index 33d11b5a2d..6324beb480 100644
Binary files a/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/images/revisions_revisions-bin.png and b/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/images/revisions_revisions-bin.png differ
diff --git a/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/images/revisions_revisions-bin.snag b/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/images/revisions_revisions-bin.snag
index a6793eaabf..a70c072260 100644
Binary files a/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/images/revisions_revisions-bin.snag and b/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/images/revisions_revisions-bin.snag differ
diff --git a/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/overview.dotnet.markdown b/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/overview.dotnet.markdown
index a1d7177517..4297d327af 100644
--- a/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/overview.dotnet.markdown
+++ b/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/overview.dotnet.markdown
@@ -178,10 +178,15 @@ Let's play with revisions a little to get a taste of its advantages.

5. **Delete the document**.
- Though you deleted the document, its **audit trail** is **not lost**: all revisions were moved to the [Revisions Bin](../../studio/database/document-extensions/revisions#revisions-bin),
- including a new revision (called "Delete-Revision"), created to indicate that the document was deleted.
-
- To see the "orphaned" revisions (whose parent document was deleted):
+ Though you deleted the document, its **audit trail** is **not lost**: all its revisions are moved to the [Revisions Bin](../../studio/database/document-extensions/revisions#revisions-bin),
+ including a new revision (called "Delete Revision"), created to indicate that the document was deleted.
+
+ {INFO: }
+ * A "Delete Revision" is created only if the deleted document has revisions.
+ * If a document has no revisions, a "Delete Revision" will be created only if the Revisions Configuration is set and enabled for its collection.
+ {INFO/}
+
+ To see the revisions created for the document before it was deleted:
* Open the `Documents > Revisions Bin` section in the Studio
* Click the deleted document's ID
diff --git a/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/overview.js.markdown b/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/overview.js.markdown
index 970c786009..990ff11e84 100644
--- a/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/overview.js.markdown
+++ b/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/overview.js.markdown
@@ -178,11 +178,16 @@ Let's play with revisions a little to get a taste of its advantages.

5. **Delete the document**.
- Though you deleted the document, its **audit trail** is **not lost**: all revisions were moved to the [Revisions Bin](../../studio/database/document-extensions/revisions#revisions-bin),
- including a new revision (called "Delete-Revision"), created to indicate that the document was deleted.
+ Though you deleted the document, its **audit trail** is **not lost**: all its revisions are moved to the [Revisions Bin](../../studio/database/document-extensions/revisions#revisions-bin),
+ including a new revision (called "Delete Revision"), created to indicate that the document was deleted.
- To see the "orphaned" revisions (whose parent document was deleted):
- * Open the `Documents > Revisions Bin` section in the Studio
+ {INFO: }
+ * A "Delete Revision" is created only if the deleted document has revisions.
+ * If a document has no revisions, a "Delete Revision" will be created only if the Revisions Configuration is set and enabled for its collection.
+ {INFO/}
+
+ To see the revisions created for the document before it was deleted:
+ * Open the `Documents > Revisions Bin` section in the Studio
* Click the deleted document's ID

diff --git a/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/overview.python.markdown b/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/overview.python.markdown
index 5f41dc282f..c062324940 100644
--- a/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/overview.python.markdown
+++ b/Documentation/5.4/Raven.Documentation.Pages/document-extensions/revisions/overview.python.markdown
@@ -178,11 +178,16 @@ Let's play with revisions a little to get a taste of its advantages.

5. **Delete the document**.
- Though you deleted the document, its **audit trail** is **not lost**: all revisions were moved to the [Revisions Bin](../../studio/database/document-extensions/revisions#revisions-bin),
- including a new revision (called "Delete-Revision"), created to indicate that the document was deleted.
+ Though you deleted the document, its **audit trail** is **not lost**: all its revisions are moved to the [Revisions Bin](../../studio/database/document-extensions/revisions#revisions-bin),
+ including a new revision (called "Delete Revision"), created to indicate that the document was deleted.
- To see the "orphaned" revisions (whose parent document was deleted):
- * Open the `Documents > Revisions Bin` section in the Studio
+ {INFO: }
+ * A "Delete Revision" is created only if the deleted document has revisions.
+ * If a document has no revisions, a "Delete Revision" will be created only if the Revisions Configuration is set and enabled for its collection.
+ {INFO/}
+
+ To see the revisions created for the document before it was deleted:
+ * Open the `Documents > Revisions Bin` section in the Studio
* Click the deleted document's ID

diff --git a/Documentation/5.4/Raven.Documentation.Pages/studio/database/document-extensions/revisions.markdown b/Documentation/5.4/Raven.Documentation.Pages/studio/database/document-extensions/revisions.markdown
index fa5c9552d3..c49782df44 100644
--- a/Documentation/5.4/Raven.Documentation.Pages/studio/database/document-extensions/revisions.markdown
+++ b/Documentation/5.4/Raven.Documentation.Pages/studio/database/document-extensions/revisions.markdown
@@ -94,7 +94,7 @@ Click the revision's comparison button to compare it with other revisions:

1. **Exit revisions compare mode**
- Click to exit the comparison window and return to the revisions tTab in the Document View.
+ Click to exit the comparison window and return to the revisions tab in the Document View.
2. **Compare with**
Click to select a revision to compare with.

@@ -129,9 +129,8 @@ Click the revision's comparison button to compare it with other revisions:
making them irrecoverable.
4. **Deleted document ID**
This is the ID of the document that was deleted.
- Click it to inspect the revisions created for this document,
- known as "orphaned revisions" since their parent document has been deleted.
- 
+ Click it to inspect the revisions created for this document.
+ 
* Revisions stored in the revisions bin can be [inspected](../../../studio/database/document-extensions/revisions#revision-inspection)
and cloned just like the revisions of a live document.
5. **Change vector**
diff --git a/Documentation/5.4/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.cs b/Documentation/5.4/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.cs
index 1f79c1fa48..8ab0deeb5a 100644
--- a/Documentation/5.4/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.cs
+++ b/Documentation/5.4/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.cs
@@ -30,7 +30,7 @@ public ConfigRevisions()
// ------------------------
// * A revision will be created anytime a document is modified or deleted.
// * Revisions of a deleted document can be accessed in the Revisions Bin view.
- // * At least 100 of the latest revisions will be kept.
+ // * Only the latest 100 revisions will be kept. Older ones will be discarded.
// * Older revisions will be removed if they exceed 7 days on next revision creation.
// * A maximum of 15 revisions will be deleted each time a document is updated,
// until the defined '# of revisions to keep' limit is reached.
@@ -174,7 +174,7 @@ public async Task ConfigRevisionsAsync()
// ------------------------
// * A revision will be created anytime a document is modified or deleted.
// * Revisions of a deleted document can be accessed in the Revisions Bin view.
- // * At least 100 of the latest revisions will be kept.
+ // * Only the latest 100 revisions will be kept. Older ones will be discarded.
// * Older revisions will be removed if they exceed 7 days on next revision creation.
// * A maximum of 15 revisions will be deleted each time a document is updated,
// until the defined '# of revisions to keep' limit is reached.
diff --git a/Documentation/5.4/Samples/nodejs/documentExtensions/revisions/client-api/operations/configureRevisions.js b/Documentation/5.4/Samples/nodejs/documentExtensions/revisions/client-api/operations/configureRevisions.js
index 2308f8ad86..7ca11f5595 100644
--- a/Documentation/5.4/Samples/nodejs/documentExtensions/revisions/client-api/operations/configureRevisions.js
+++ b/Documentation/5.4/Samples/nodejs/documentExtensions/revisions/client-api/operations/configureRevisions.js
@@ -19,7 +19,7 @@ async function configureRevisions() {
// ------------------------
// * A revision will be created anytime a document is modified or deleted.
// * Revisions of a deleted document can be accessed in the Revisions Bin view.
- // * At least 100 of the latest revisions will be kept.
+ // * Only the latest 100 revisions will be kept. Older ones will be discarded.
// * Older revisions will be removed if they exceed 7 days on next revision creation.
// * A maximum of 15 revisions will be deleted each time a document is updated,
// until the defined '# of revisions to keep' limit is reached.
diff --git a/Documentation/5.4/Samples/python/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.py b/Documentation/5.4/Samples/python/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.py
index 42a87f494e..f3c182adf5 100644
--- a/Documentation/5.4/Samples/python/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.py
+++ b/Documentation/5.4/Samples/python/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.py
@@ -29,7 +29,7 @@ def test_configure_revisions(self):
# ------------------------
# * A revision will be created anytime a document is modified or deleted.
# * Revisions of a deleted document can be accessed in the Revisions Bin view.
- # * At least 100 of the latest revisions will be kept.
+ # * Only the latest 100 revisions will be kept. Older ones will be discarded.
# * Older revisions will be removed if they exceed 7 days on next revision creation.
# * A maximum of 15 revisions will be deleted each time a document is updated,
# until the defined '# of revisions to keep' limit is reached.
diff --git a/Documentation/6.0/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.cs b/Documentation/6.0/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.cs
index 1f79c1fa48..8ab0deeb5a 100644
--- a/Documentation/6.0/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.cs
+++ b/Documentation/6.0/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.cs
@@ -30,7 +30,7 @@ public ConfigRevisions()
// ------------------------
// * A revision will be created anytime a document is modified or deleted.
// * Revisions of a deleted document can be accessed in the Revisions Bin view.
- // * At least 100 of the latest revisions will be kept.
+ // * Only the latest 100 revisions will be kept. Older ones will be discarded.
// * Older revisions will be removed if they exceed 7 days on next revision creation.
// * A maximum of 15 revisions will be deleted each time a document is updated,
// until the defined '# of revisions to keep' limit is reached.
@@ -174,7 +174,7 @@ public async Task ConfigRevisionsAsync()
// ------------------------
// * A revision will be created anytime a document is modified or deleted.
// * Revisions of a deleted document can be accessed in the Revisions Bin view.
- // * At least 100 of the latest revisions will be kept.
+ // * Only the latest 100 revisions will be kept. Older ones will be discarded.
// * Older revisions will be removed if they exceed 7 days on next revision creation.
// * A maximum of 15 revisions will be deleted each time a document is updated,
// until the defined '# of revisions to keep' limit is reached.
diff --git a/Documentation/6.0/Samples/nodejs/document-extensions/revisions/client-api/operations/configureRevisions.js b/Documentation/6.0/Samples/nodejs/document-extensions/revisions/client-api/operations/configureRevisions.js
index 2308f8ad86..7ca11f5595 100644
--- a/Documentation/6.0/Samples/nodejs/document-extensions/revisions/client-api/operations/configureRevisions.js
+++ b/Documentation/6.0/Samples/nodejs/document-extensions/revisions/client-api/operations/configureRevisions.js
@@ -19,7 +19,7 @@ async function configureRevisions() {
// ------------------------
// * A revision will be created anytime a document is modified or deleted.
// * Revisions of a deleted document can be accessed in the Revisions Bin view.
- // * At least 100 of the latest revisions will be kept.
+ // * Only the latest 100 revisions will be kept. Older ones will be discarded.
// * Older revisions will be removed if they exceed 7 days on next revision creation.
// * A maximum of 15 revisions will be deleted each time a document is updated,
// until the defined '# of revisions to keep' limit is reached.
diff --git a/Documentation/6.0/Samples/python/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.py b/Documentation/6.0/Samples/python/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.py
index 42a87f494e..f3c182adf5 100644
--- a/Documentation/6.0/Samples/python/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.py
+++ b/Documentation/6.0/Samples/python/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.py
@@ -29,7 +29,7 @@ def test_configure_revisions(self):
# ------------------------
# * A revision will be created anytime a document is modified or deleted.
# * Revisions of a deleted document can be accessed in the Revisions Bin view.
- # * At least 100 of the latest revisions will be kept.
+ # * Only the latest 100 revisions will be kept. Older ones will be discarded.
# * Older revisions will be removed if they exceed 7 days on next revision creation.
# * A maximum of 15 revisions will be deleted each time a document is updated,
# until the defined '# of revisions to keep' limit is reached.
diff --git a/Documentation/6.2/Raven.Documentation.Pages/Raven.Documentation.Pages.csproj b/Documentation/6.2/Raven.Documentation.Pages/Raven.Documentation.Pages.csproj
index 552f9b1ee6..65ab1d8db6 100644
--- a/Documentation/6.2/Raven.Documentation.Pages/Raven.Documentation.Pages.csproj
+++ b/Documentation/6.2/Raven.Documentation.Pages/Raven.Documentation.Pages.csproj
@@ -5,9 +5,9 @@
-
-
-
+
+
+
diff --git a/Documentation/6.2/Raven.Documentation.Pages/client-api/operations/what-are-operations.dotnet.markdown b/Documentation/6.2/Raven.Documentation.Pages/client-api/operations/what-are-operations.dotnet.markdown
index 3b150a8f55..87d176bb3c 100644
--- a/Documentation/6.2/Raven.Documentation.Pages/client-api/operations/what-are-operations.dotnet.markdown
+++ b/Documentation/6.2/Raven.Documentation.Pages/client-api/operations/what-are-operations.dotnet.markdown
@@ -256,6 +256,7 @@
* **Revisions**:
[ConfigureRevisionsOperation](../../document-extensions/revisions/client-api/operations/configure-revisions)
[DeleteRevisionsOperation](../../document-extensions/revisions/client-api/operations/delete-revisions)
+ [ConfigureRevisionsBinCleanerOperation](../../document-extensions/revisions/revisions-bin-cleaner#setting-the-revisions-bin-cleaner---from-the-client-api)
* **Sorters**:
[PutSortersOperation](../../client-api/operations/maintenance/sorters/put-sorter)
diff --git a/Documentation/6.2/Raven.Documentation.Pages/document-extensions/revisions/.docs.json b/Documentation/6.2/Raven.Documentation.Pages/document-extensions/revisions/.docs.json
index e51c6bf011..cbb87abf4a 100644
--- a/Documentation/6.2/Raven.Documentation.Pages/document-extensions/revisions/.docs.json
+++ b/Documentation/6.2/Raven.Documentation.Pages/document-extensions/revisions/.docs.json
@@ -1,94 +1,100 @@
[
- {
- "Path": "overview.markdown",
- "Name": "Overview",
- "DiscussionId": "ed9e00a0-d1bd-4fa4-bb47-585538a29f51",
- "Mappings": [
- {
- "Version": 5.2,
- "Key": "server/extensions/revisions"
- },
- {
- "Version": 5.1,
- "Key": "server/extensions/revisions"
- },
- {
- "Version": 5.0,
- "Key": "server/extensions/revisions"
- },
- {
- "Version": 4.2,
- "Key": "server/extensions/revisions"
- },
- {
- "Version": 4.1,
- "Key": "server/extensions/revisions"
- },
- {
- "Version": 4.0,
- "Key": "server/extensions/revisions"
- }
- ]
- },
- {
- "Path": "revert-revisions.markdown",
- "Name": "Revert Documents to Revisions",
- "DiscussionId": "ed9e00a0-d1bd-4fa4-bb47-585538a29f51",
- "Mappings": [
- {
- "Version": 5.2,
- "Key": "server/extensions/revert-revisions"
- },
- {
- "Version": 5.1,
- "Key": "server/extensions/revert-revisions"
- },
- {
- "Version": 5.0,
- "Key": "server/extensions/revert-revisions"
- },
- {
- "Version": 4.2,
- "Key": "server/extensions/revert-revisions"
- }
- ]
- },
- {
- "Path": "/client-api",
- "Name": "Client API",
- "Mappings": []
- },
- {
- "Path": "revisions-and-other-features.markdown",
- "Name": "Revisions and Other Features",
- "DiscussionId": "68e60b2c-83a2-42dd-b464-9deb18c90e7a",
- "Mappings": [
- {
- "Version": 5.2,
- "Key": "client-api/session/revisions/counter-revisions"
- },
- {
- "Version": 5.1,
- "Key": "client-api/session/revisions/counter-revisions"
- },
- {
- "Version": 5.0,
- "Key": "client-api/session/revisions/counter-revisions"
- },
- {
- "Version": 4.2,
- "Key": "client-api/session/revisions/counter-revisions"
- },
- {
- "Version": 4.1,
- "Key": "client-api/session/revisions/counter-revisions"
- }
- ]
- },
- {
- "Path": "troubleshooting.markdown",
- "Name": "Troubleshooting",
- "DiscussionId": "e60b674f-e129-4426-92c0-84adb33cbe25",
- "Mappings": []
- }
+ {
+ "Path": "overview.markdown",
+ "Name": "Overview",
+ "DiscussionId": "ed9e00a0-d1bd-4fa4-bb47-585538a29f51",
+ "Mappings": [
+ {
+ "Version": 5.2,
+ "Key": "server/extensions/revisions"
+ },
+ {
+ "Version": 5.1,
+ "Key": "server/extensions/revisions"
+ },
+ {
+ "Version": 5.0,
+ "Key": "server/extensions/revisions"
+ },
+ {
+ "Version": 4.2,
+ "Key": "server/extensions/revisions"
+ },
+ {
+ "Version": 4.1,
+ "Key": "server/extensions/revisions"
+ },
+ {
+ "Version": 4.0,
+ "Key": "server/extensions/revisions"
+ }
+ ]
+ },
+ {
+ "Path": "/client-api",
+ "Name": "Client API",
+ "Mappings": []
+ },
+ {
+ "Path": "revert-revisions.markdown",
+ "Name": "Revert Documents to Revisions",
+ "DiscussionId": "ed9e00a0-d1bd-4fa4-bb47-585538a29f51",
+ "Mappings": [
+ {
+ "Version": 5.2,
+ "Key": "server/extensions/revert-revisions"
+ },
+ {
+ "Version": 5.1,
+ "Key": "server/extensions/revert-revisions"
+ },
+ {
+ "Version": 5.0,
+ "Key": "server/extensions/revert-revisions"
+ },
+ {
+ "Version": 4.2,
+ "Key": "server/extensions/revert-revisions"
+ }
+ ]
+ },
+ {
+ "Path": "revisions-and-other-features.markdown",
+ "Name": "Revisions and Other Features",
+ "DiscussionId": "68e60b2c-83a2-42dd-b464-9deb18c90e7a",
+ "Mappings": [
+ {
+ "Version": 5.2,
+ "Key": "client-api/session/revisions/counter-revisions"
+ },
+ {
+ "Version": 5.1,
+ "Key": "client-api/session/revisions/counter-revisions"
+ },
+ {
+ "Version": 5.0,
+ "Key": "client-api/session/revisions/counter-revisions"
+ },
+ {
+ "Version": 4.2,
+ "Key": "client-api/session/revisions/counter-revisions"
+ },
+ {
+ "Version": 4.1,
+ "Key": "client-api/session/revisions/counter-revisions"
+ }
+ ]
+ },
+ {
+ "Path": "revisions-bin-cleaner.markdown",
+ "Name": "Revisions Bin Cleaner",
+ "DiscussionId": "0acef912-fa39-43b5-9188-7265b1c45608",
+ "Mappings": []
+ },
+ {
+ "Path": "troubleshooting.markdown",
+ "Name": "Troubleshooting",
+ "DiscussionId": "e60b674f-e129-4426-92c0-84adb33cbe25",
+ "Mappings": []
+ }
]
diff --git a/Documentation/6.2/Raven.Documentation.Pages/document-extensions/revisions/client-api/operations/delete-revisions.dotnet.markdown b/Documentation/6.2/Raven.Documentation.Pages/document-extensions/revisions/client-api/operations/delete-revisions.dotnet.markdown
index 46c0c78bad..9c1ac03619 100644
--- a/Documentation/6.2/Raven.Documentation.Pages/document-extensions/revisions/client-api/operations/delete-revisions.dotnet.markdown
+++ b/Documentation/6.2/Raven.Documentation.Pages/document-extensions/revisions/client-api/operations/delete-revisions.dotnet.markdown
@@ -75,6 +75,22 @@ No exception is thrown if a change vector doesn’t match any revision.
{CODE-TAB:csharp:Async delete_revisions_4_async@DocumentExtensions\Revisions\ClientAPI\Operations\DeleteRevisions.cs /}
{CODE-TABS/}
+{CONTENT-FRAME: }
+
+Avoid deleting a "Delete Revision" using the `DeleteRevisionsOperation` operation.
+Consider the following scenario:
+
+1. A document that has revisions is deleted.
+
+2. A "Delete Revision" is created for the document, and it will be listed in the [Revisions Bin](../../../../studio/database/document-extensions/revisions#revisions-bin).
+
+3. The revisions of this deleted document remain accessible via the Revisions Bin.
+
+4. If you remove this "Delete Revision" by providing its change vector to `DeleteRevisionsOperation`,
+ the "Delete Revision" will be removed from the Revisions Bin, causing the associated revisions to become orphaned.
+ As a result, you will no longer have access to these revisions via the Revisions Bin.
+
+{CONTENT-FRAME/}
{PANEL/}
{PANEL: Syntax}
diff --git a/Documentation/6.2/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-bin-cleaner.png b/Documentation/6.2/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-bin-cleaner.png
new file mode 100644
index 0000000000..b81382b595
Binary files /dev/null and b/Documentation/6.2/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-bin-cleaner.png differ
diff --git a/Documentation/6.2/Raven.Documentation.Pages/document-extensions/revisions/revisions-bin-cleaner.markdown b/Documentation/6.2/Raven.Documentation.Pages/document-extensions/revisions/revisions-bin-cleaner.markdown
new file mode 100644
index 0000000000..4efcfec425
--- /dev/null
+++ b/Documentation/6.2/Raven.Documentation.Pages/document-extensions/revisions/revisions-bin-cleaner.markdown
@@ -0,0 +1,104 @@
+# Revisions Bin Cleaner
+---
+
+{NOTE: }
+
+* The [Revisions Bin](../../studio/database/document-extensions/revisions#revisions-bin) stores revisions of deleted documents, ensuring they remain accessible.
+
+* While you can manually delete these revisions directly from the Revisions Bin,
+ you can also set up a cleaner task to remove them automatically. Learn more below.
+
+* In this page:
+ * [The revisions bin cleaner](../../document-extensions/revisions/revisions-bin-cleaner#the-revisions-bin-cleaner)
+ * [Setting the revisions bin cleaner - from the Studio](../../document-extensions/revisions/revisions-bin-cleaner#setting-the-revisions-bin-cleaner---from-the-studio)
+ * [Setting the revisions bin cleaner - from the Client API](../../document-extensions/revisions/revisions-bin-cleaner#setting-the-revisions-bin-cleaner---from-the-client-api)
+ * [Syntax](../../document-extensions/revisions/revisions-bin-cleaner#syntax)
+
+{NOTE/}
+
+---
+
+{PANEL: The revisions bin cleaner}
+
+Each entry in the [Revisions Bin](../../studio/database/document-extensions/revisions#revisions-bin) represents a "Delete Revision",
+which is a revision that marks a document as deleted and provides access to the revisions that were created for the document before it was deleted.
+
+{WARNING: }
+When the cleaner removes a "Delete Revision" entry,
+ALL the revisions associated with the deleted document are **permanently deleted**.
+{WARNING/}
+
+---
+
+* The Revisions Bin Cleaner is configured with the following parameters:
+ * **Frequency** - How often the cleaner runs.
+ * **Entries age to keep** - The cleaner deletes revision entries older than this value.
+
+* The cleaner task can be managed from:
+ * The [Revisions bin cleaner view](../../document-extensions/revisions/revisions-bin-cleaner#setting-the-revisions-bin-cleaner---from-the-studio) in the Studio
+ * The [Client API](../../document-extensions/revisions/revisions-bin-cleaner#setting-the-revisions-bin-cleaner---from-the-client-api).
+
+* When working with a secure server:
+ * Configuring the Revisions Bin Cleaner is logged in the [audit log](../../server/security/audit-log/audit-log).
+ * Deleting revisions is only available to a client certificate with a security clearance of [Database Admin](../../server/security/authorization/security-clearance-and-permissions#section) or higher.
+
+{PANEL/}
+
+{PANEL: Setting the revisions bin cleaner - from the Studio}
+
+
+
+1. Go to **Settings > Revisions Bin Cleaner**
+2. Toggle ON to enable the cleaner task.
+3. Set the minimum entries age to keep:
+ * When toggled ON:
+ * Revisions Bin entries older than this value will be deleted.
+ * Default: `30` days.
+ * When toggled OFF:
+ * ALL Revisions Bin entries will be deleted.
+4. Set the custom cleaner frequency:
+ * Define how often (in seconds) the Revisions Bin Cleaner runs.
+ * Default: `300` seconds (5 minutes).
+
+{PANEL/}
+
+{PANEL: Setting the revisions bin cleaner - from the Client API}
+
+* Use `ConfigureRevisionsBinCleanerOperation` to configure the Revisions Bin Cleaner from the Client API.
+
+* By default, the operation will be applied to the [default database](../../client-api/setting-up-default-database).
+ To operate on a different database see [switch operations to different database](../../client-api/operations/how-to/switch-operations-to-a-different-database).
+
+* In this example, we enable the cleaner and configure its execution frequency and retention policy.
+
+ {CODE-TABS}
+ {CODE-TAB:csharp:Sync configure_cleaner@DocumentExtensions\Revisions\ClientAPI\Operations\RevisionsBinCleaner.cs /}
+ {CODE-TAB:csharp:Async configure_cleaner_async@DocumentExtensions\Revisions\ClientAPI\Operations\RevisionsBinCleaner.cs /}
+ {CODE-TABS/}
+
+{PANEL/}
+
+{PANEL: Syntax}
+
+{CODE:csharp syntax_1@DocumentExtensions\Revisions\ClientAPI\Operations\RevisionsBinCleaner.cs /}
+{CODE:csharp syntax_2@DocumentExtensions\Revisions\ClientAPI\Operations\RevisionsBinCleaner.cs /}
+
+{PANEL/}
+
+## Related Articles
+
+### Document Extensions
+
+* [Document Revisions Overview](../../document-extensions/revisions/overview)
+* [Revisions and Other Features](../../document-extensions/revisions/revisions-and-other-features)
+
+### Client API
+
+* [Revisions: API Overview](../../document-extensions/revisions/client-api/overview)
+* [Operations: Configuring Revisions](../../document-extensions/revisions/client-api/operations/configure-revisions)
+* [Session: Loading Revisions](../../document-extensions/revisions/client-api/session/loading)
+
+### Studio
+
+* [Settings: Document Revisions](../../studio/database/settings/document-revisions)
+* [Revisions Bin](../../studio/database/document-extensions/revisions#revisions-bin)
diff --git a/Documentation/6.2/Raven.Documentation.Pages/server/security/audit-log/audit-log.markdown b/Documentation/6.2/Raven.Documentation.Pages/server/security/audit-log/audit-log.markdown
index f77fde2b75..c06da58617 100644
--- a/Documentation/6.2/Raven.Documentation.Pages/server/security/audit-log/audit-log.markdown
+++ b/Documentation/6.2/Raven.Documentation.Pages/server/security/audit-log/audit-log.markdown
@@ -73,6 +73,7 @@
* **Revisions**:
Deleting revisions
Modifying revisions settings
+ Modifying revisions bin cleaner settings
* **Ongoing tasks**:
Adding or updating an ETL task
Adding or updating a Kafka Sink or a RabbitMQ Sink task
diff --git a/Documentation/6.2/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/RevisionsBinCleaner.cs b/Documentation/6.2/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/RevisionsBinCleaner.cs
new file mode 100644
index 0000000000..efeb51c6f3
--- /dev/null
+++ b/Documentation/6.2/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/RevisionsBinCleaner.cs
@@ -0,0 +1,85 @@
+using System.Threading.Tasks;
+using Raven.Client.Documents;
+using Raven.Client.Documents.Operations.Revisions;
+
+namespace Raven.Documentation.Samples.DocumentExtensions.Revisions.ClientAPI.Operations
+{
+ public class RevisionsBinCleaner
+ {
+ public RevisionsBinCleaner()
+ {
+ using (var store = new DocumentStore())
+ {
+ #region configure_cleaner
+ //Define the revisions bin cleaner configuration
+ var config = new RevisionsBinConfiguration()
+ {
+ // Enable the cleaner
+ Disabled = false,
+
+ // Set the cleaner execution frequency
+ CleanerFrequencyInSec = 24 * 60 * 60, // one day (in seconds)
+
+ // Revisions bin entries older than the following value will be deleted
+ MinimumEntriesAgeToKeepInMin = 24 * 60 // one day (in minutes)
+ };
+
+ // Define the operation
+ var configRevisionsBinCleanerOp = new ConfigureRevisionsBinCleanerOperation(config);
+
+ // Execute the operation by passing it to Maintenance.Send
+ store.Maintenance.Send(configRevisionsBinCleanerOp);
+ #endregion
+ }
+ }
+
+ public async Task ConfigRevisionsAsync()
+ {
+ using (var store = new DocumentStore())
+ {
+ #region configure_cleaner_async
+ var config = new RevisionsBinConfiguration()
+ {
+ Disabled = false,
+ CleanerFrequencyInSec = 24 * 60 * 60,
+ MinimumEntriesAgeToKeepInMin = 24 * 60
+ };
+
+ var configRevisionsBinCleanerOp = new ConfigureRevisionsBinCleanerOperation(config);
+ await store.Maintenance.SendAsync(configRevisionsBinCleanerOp);
+ #endregion
+ }
+ }
+
+ public class Syntax
+ {
+ public interface IFoo
+ {
+ /*
+ #region syntax_1
+ public ConfigureRevisionsBinCleanerOperation(RevisionsBinConfiguration configuration);
+ #endregion
+ */
+ }
+
+ #region syntax_2
+ public class RevisionsBinConfiguration
+ {
+ // Set to true to enable the revisions bin cleaner.
+ // Default: false (cleaner is disabled).
+ public bool Disabled { get; set; }
+
+ // The minimum age (in minutes) for revisions-bin entries to be kept in the database.
+ // The cleaner deletes entries older than this value.
+ // When set to 0: ALL revisions-bin entries will be removed from the Revisions Bin
+ // Default: 30 days.
+ public int MinimumEntriesAgeToKeepInMin { get; set; }
+
+ // The frequency (in seconds) at which the revisions bin cleaner executes.
+ // Default: 300 seconds (5 minutes).
+ public long CleanerFrequencyInSec { get; set; } = 5 * 60;
+ }
+ #endregion
+ }
+ }
+}
diff --git a/Documentation/6.2/Samples/csharp/Raven.Documentation.Samples/Raven.Documentation.Samples.csproj b/Documentation/6.2/Samples/csharp/Raven.Documentation.Samples/Raven.Documentation.Samples.csproj
index abad6bcd17..2a6b0bbe97 100644
--- a/Documentation/6.2/Samples/csharp/Raven.Documentation.Samples/Raven.Documentation.Samples.csproj
+++ b/Documentation/6.2/Samples/csharp/Raven.Documentation.Samples/Raven.Documentation.Samples.csproj
@@ -8,9 +8,9 @@
-
-
-
+
+
+
diff --git a/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/.docs.json b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/.docs.json
index e51c6bf011..cbb87abf4a 100644
--- a/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/.docs.json
+++ b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/.docs.json
@@ -1,94 +1,100 @@
[
- {
- "Path": "overview.markdown",
- "Name": "Overview",
- "DiscussionId": "ed9e00a0-d1bd-4fa4-bb47-585538a29f51",
- "Mappings": [
- {
- "Version": 5.2,
- "Key": "server/extensions/revisions"
- },
- {
- "Version": 5.1,
- "Key": "server/extensions/revisions"
- },
- {
- "Version": 5.0,
- "Key": "server/extensions/revisions"
- },
- {
- "Version": 4.2,
- "Key": "server/extensions/revisions"
- },
- {
- "Version": 4.1,
- "Key": "server/extensions/revisions"
- },
- {
- "Version": 4.0,
- "Key": "server/extensions/revisions"
- }
- ]
- },
- {
- "Path": "revert-revisions.markdown",
- "Name": "Revert Documents to Revisions",
- "DiscussionId": "ed9e00a0-d1bd-4fa4-bb47-585538a29f51",
- "Mappings": [
- {
- "Version": 5.2,
- "Key": "server/extensions/revert-revisions"
- },
- {
- "Version": 5.1,
- "Key": "server/extensions/revert-revisions"
- },
- {
- "Version": 5.0,
- "Key": "server/extensions/revert-revisions"
- },
- {
- "Version": 4.2,
- "Key": "server/extensions/revert-revisions"
- }
- ]
- },
- {
- "Path": "/client-api",
- "Name": "Client API",
- "Mappings": []
- },
- {
- "Path": "revisions-and-other-features.markdown",
- "Name": "Revisions and Other Features",
- "DiscussionId": "68e60b2c-83a2-42dd-b464-9deb18c90e7a",
- "Mappings": [
- {
- "Version": 5.2,
- "Key": "client-api/session/revisions/counter-revisions"
- },
- {
- "Version": 5.1,
- "Key": "client-api/session/revisions/counter-revisions"
- },
- {
- "Version": 5.0,
- "Key": "client-api/session/revisions/counter-revisions"
- },
- {
- "Version": 4.2,
- "Key": "client-api/session/revisions/counter-revisions"
- },
- {
- "Version": 4.1,
- "Key": "client-api/session/revisions/counter-revisions"
- }
- ]
- },
- {
- "Path": "troubleshooting.markdown",
- "Name": "Troubleshooting",
- "DiscussionId": "e60b674f-e129-4426-92c0-84adb33cbe25",
- "Mappings": []
- }
+ {
+ "Path": "overview.markdown",
+ "Name": "Overview",
+ "DiscussionId": "ed9e00a0-d1bd-4fa4-bb47-585538a29f51",
+ "Mappings": [
+ {
+ "Version": 5.2,
+ "Key": "server/extensions/revisions"
+ },
+ {
+ "Version": 5.1,
+ "Key": "server/extensions/revisions"
+ },
+ {
+ "Version": 5.0,
+ "Key": "server/extensions/revisions"
+ },
+ {
+ "Version": 4.2,
+ "Key": "server/extensions/revisions"
+ },
+ {
+ "Version": 4.1,
+ "Key": "server/extensions/revisions"
+ },
+ {
+ "Version": 4.0,
+ "Key": "server/extensions/revisions"
+ }
+ ]
+ },
+ {
+ "Path": "/client-api",
+ "Name": "Client API",
+ "Mappings": []
+ },
+ {
+ "Path": "revert-revisions.markdown",
+ "Name": "Revert Documents to Revisions",
+ "DiscussionId": "ed9e00a0-d1bd-4fa4-bb47-585538a29f51",
+ "Mappings": [
+ {
+ "Version": 5.2,
+ "Key": "server/extensions/revert-revisions"
+ },
+ {
+ "Version": 5.1,
+ "Key": "server/extensions/revert-revisions"
+ },
+ {
+ "Version": 5.0,
+ "Key": "server/extensions/revert-revisions"
+ },
+ {
+ "Version": 4.2,
+ "Key": "server/extensions/revert-revisions"
+ }
+ ]
+ },
+ {
+ "Path": "revisions-and-other-features.markdown",
+ "Name": "Revisions and Other Features",
+ "DiscussionId": "68e60b2c-83a2-42dd-b464-9deb18c90e7a",
+ "Mappings": [
+ {
+ "Version": 5.2,
+ "Key": "client-api/session/revisions/counter-revisions"
+ },
+ {
+ "Version": 5.1,
+ "Key": "client-api/session/revisions/counter-revisions"
+ },
+ {
+ "Version": 5.0,
+ "Key": "client-api/session/revisions/counter-revisions"
+ },
+ {
+ "Version": 4.2,
+ "Key": "client-api/session/revisions/counter-revisions"
+ },
+ {
+ "Version": 4.1,
+ "Key": "client-api/session/revisions/counter-revisions"
+ }
+ ]
+ },
+ {
+ "Path": "revisions-bin-cleaner.markdown",
+ "Name": "Revisions Bin Cleaner",
+ "DiscussionId": "0acef912-fa39-43b5-9188-7265b1c45608",
+ "Mappings": []
+ },
+ {
+ "Path": "troubleshooting.markdown",
+ "Name": "Troubleshooting",
+ "DiscussionId": "e60b674f-e129-4426-92c0-84adb33cbe25",
+ "Mappings": []
+ }
]
diff --git a/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/client-api/operations/configure-revisions.dotnet.markdown b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/client-api/operations/configure-revisions.dotnet.markdown
new file mode 100644
index 0000000000..73f100c33b
--- /dev/null
+++ b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/client-api/operations/configure-revisions.dotnet.markdown
@@ -0,0 +1,107 @@
+# Configure Revisions Operation
+
+---
+
+{NOTE: }
+
+* Use `ConfigureRevisionsOperation` to apply the following [revisions configuration](../../../../studio/database/settings/document-revisions#revisions-configuration) to the database:
+ * **Default configuration** - applies to all document collections.
+ * **Collection-specific configurations** - override the default settings for these collections.
+ * To apply a configuration for conflict document revisions see [configure conflict revisions](../../../../document-extensions/revisions/client-api/operations/conflict-revisions-configuration).
+
+* The configuration passed to this operation will **REPLACE** the current revisions configuration in the database.
+ To **MODIFY** existing configuration, fetch the current configuration from the database record first.
+
+* After applying the configuration,
+ revisions are created and purged for a document whenever the document is created, modified, or deleted.
+
+* To create a revision when there is no configuration defined (or enabled) see: [force revision creation](../../../../document-extensions/revisions/overview#force-revision-creation)
+
+* By default, the operation will be applied to the [default database](../../../../client-api/setting-up-default-database).
+ To operate on a different database see [switch operations to different database](../../../../client-api/operations/how-to/switch-operations-to-a-different-database).
+
+* In this page:
+ * [Replace configuration](../../../../document-extensions/revisions/client-api/operations/configure-revisions#replace-configuration)
+ * [Modify configuration](../../../../document-extensions/revisions/client-api/operations/configure-revisions#modify-configuration)
+ * [Syntax](../../../../document-extensions/revisions/client-api/operations/configure-revisions#syntax)
+
+{NOTE/}
+
+---
+
+{PANEL: Replace configuration}
+
+* In this example, we create a new `RevisionsConfiguration` for the database.
+ If revisions configuration already exists in the database - it will be **replaced**.
+
+{CODE-TABS}
+{CODE-TAB:csharp:Sync replace_configuration@DocumentExtensions\Revisions\ClientAPI\Operations\ConfigureRevisions.cs /}
+{CODE-TAB:csharp:Async replace_configuration_async@DocumentExtensions\Revisions\ClientAPI\Operations\ConfigureRevisions.cs /}
+{CODE-TABS/}
+
+{PANEL/}
+
+{PANEL: Modify configuration}
+
+* In this example, we fetch the existing revisions configuration from the database record and **modify** it.
+
+{CODE-TABS}
+{CODE-TAB:csharp:Sync modify_configuration@DocumentExtensions\Revisions\ClientAPI\Operations\ConfigureRevisions.cs /}
+{CODE-TAB:csharp:Async modify_configuration_async@DocumentExtensions\Revisions\ClientAPI\Operations\ConfigureRevisions.cs /}
+{CODE-TABS/}
+
+{PANEL/}
+
+{PANEL: Syntax}
+
+{CODE:csharp syntax_1@DocumentExtensions\Revisions\ClientAPI\Operations\ConfigureRevisions.cs /}
+
+| Parameter | Type | Description |
+| - | - | - |
+| **configuration** | `RevisionsConfiguration` | The revisions configuration to apply |
+
+{CODE:csharp syntax_2@DocumentExtensions\Revisions\ClientAPI\Operations\ConfigureRevisions.cs /}
+
+| Property | Type | Description |
+| - | - | - |
+| **Default** | `RevisionsCollectionConfiguration` | Optional default settings that apply to any collection Not specified in `Collections`. |
+| **Collections** | `Dictionary` | A Dictionary of collection-specific configurations
The `keys` are the collection names
The `values` are the corresponding configurations.
Overrides the default settings for the collections defined. |
+
+{CODE:csharp syntax_3@DocumentExtensions\Revisions\ClientAPI\Operations\ConfigureRevisions.cs /}
+
+
+
+| Property | Type | Description |
+| - | - |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| **MinimumRevisionsToKeep** | `long` | - This number of revisions will be kept per document.
- Older revisions exceeding this number will be purged upon the next document modification.
- **Default** : `null` = no limit
|
+| **MinimumRevisionAgeToKeep** | `TimeSpan` | - Limit the number of revisions kept per document by their age.
- Revisions that are older than this time will be purged upon the next document modification.
- **Default** : `null` = no age limit
|
+| **MaximumRevisionsToDeleteUponDocumentUpdate** | `long` | - The maximum number of revisions to delete upon each document modification.
- **Default** : `null` = no limit,
all revisions that pend purging will be deleted.
|
+| **PurgeOnDelete** | `bool` | - `false` ( **Default** ) - Revisions of a deleted document are moved to the [Revisions Bin](../../../../studio/database/document-extensions/revisions/revisions-bin).
- `true` - When a document is deleted all its revisions are also deleted.
|
+| **Disabled** | `bool` | - `false` ( **Default** ) - Revisions will be created and purged according to the configuration.
- `true` - No revisions will be created or purged.
|
+
+{PANEL/}
+
+## Related Articles
+
+### Document Extensions
+
+* [Document Revisions Overview](../../../../document-extensions/revisions/overview)
+* [Revert Revisions](../../../../document-extensions/revisions/revert-revisions)
+* [Revisions and Other Features](../../../../document-extensions/revisions/revisions-and-other-features)
+
+### Client API
+
+* [Revisions: API Overview](../../../../document-extensions/revisions/client-api/overview)
+* [Session: Loading Revisions](../../../../document-extensions/revisions/client-api/session/loading)
+* [Session: Including Revisions](../../../../document-extensions/revisions/client-api/session/including)
+* [Session: Counting Revisions](../../../../document-extensions/revisions/client-api/session/counting)
+* [What Is a Collection](../../../../client-api/faq/what-is-a-collection)
+* [What Are Operations](../../../../client-api/operations/what-are-operations)
+* [Switch Operation Database](../../../../client-api/operations/how-to/switch-operations-to-a-different-database)
+* [Setting Up a Default Database](../../../../client-api/setting-up-default-database)
+
+### Studio
+
+* [Settings: Document Revisions](../../../../studio/database/settings/document-revisions)
+* [Document Extensions: Revisions](../../../../studio/database/document-extensions/revisions)
+* [Manage Database Group](../../../../studio/database/settings/manage-database-group)
diff --git a/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/client-api/operations/configure-revisions.java.markdown b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/client-api/operations/configure-revisions.java.markdown
new file mode 100644
index 0000000000..d0975175b6
--- /dev/null
+++ b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/client-api/operations/configure-revisions.java.markdown
@@ -0,0 +1,155 @@
+# Configure Revisions Operation
+
+---
+
+{NOTE: }
+
+* [Revisions](../../../../document-extensions/revisions/overview) are snapshots of documents that
+ are taken automatically each time a document is updated or deleted.
+
+* Revisions can be stored indefinitely, or they can be deleted when certain conditions are met. These conditions can be set
+ using the Configure Revisions Operation.
+
+* In this page:
+ * [Syntax](../../../../document-extensions/revisions/client-api/operations/configure-revisions#syntax)
+ * [RevisionsCollectionConfiguration](../../../../document-extensions/revisions/client-api/operations/configure-revisions#revisionscollectionconfiguration)
+ * [RevisionsConfiguration](../../../../document-extensions/revisions/client-api/operations/configure-revisions#revisionsconfiguration)
+ * [ConfigureRevisionsOperation](../../../../document-extensions/revisions/client-api/operations/configure-revisions#configurerevisionsoperation)
+ * [Example](../../../../document-extensions/revisions/client-api/operations/configure-revisions#example)
+
+{NOTE/}
+
+---
+
+{PANEL: Syntax}
+
+The ConfigureRevisionsOperation modifies the revisions settings for a particular [database](../../../../studio/database/settings/manage-database-group).
+Within that database, each [collection](../../../../client-api/faq/what-is-a-collection) can have its own separate revisions
+settings.
+
+To configure the revisions settings for a database and/or the collections in that database, follow these steps:
+
+[1.](../../../../document-extensions/revisions/client-api/operations/configure-revisions#revisionscollectionconfiguration)
+Create a RevisionsCollectionConfiguration` object for each desired collection.
+
+[2.](../../../../document-extensions/revisions/client-api/operations/configure-revisions#revisionsconfiguration)
+Put those `RevisionsCollectionConfiguration` objects in a `RevisionsConfiguration` object.
+
+[3.](../../../../document-extensions/revisions/client-api/operations/configure-revisions#configurerevisionsoperation)
+Send that RevisionsConfiguration` to the server.
+
+---
+
+### RevisionsCollectionConfiguration
+
+This object contains the four revisions settings for a particular collection:
+
+{CODE-BLOCK: java}
+public class RevisionsCollectionConfiguration
+{
+ private boolean disabled;
+ private Duration minimumRevisionAgeToKeep;
+ private Long minimumRevisionsToKeep;
+ private boolean purgeOnDelete;
+}
+{CODE-BLOCK/}
+
+| Configuration Option | Description | Default |
+| - | - | - |
+| **minimumRevisionsToKeep** | The minimum number of revisions to keep per document | `null` - unlimited |
+| **minimumRevisionAgeToKeep** | The minimum amount of time to keep each revision. [Format of `Duration`](https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html). | `null` - unlimited |
+| **disabled** | Indicates whether to completely disable revisions for documents in this collection | `false` |
+| **purgeOnDelete** | When a document is deleted, this indicates whether all of its revisions should be deleted as well | `false` |
+
+A revision is only deleted if both the `minimumRevisionsToKeep` for that document is exceeded, **and** the revision is
+older than the `minimumRevisionAgeToKeep` limit. The oldest revisions are deleted first.
+
+* By default both these options are set to `null`, meaning that an unlimited number of revisions will be saved
+indefinitely.
+
+* If only `minimumRevisionsToKeep` is null, revisions will be deleted only when they are older than
+`minimumRevisionAgeToKeep`.
+
+* If only `minimumRevisionAgeToKeep` is null, revisions will be deleted each time there are more revisions than
+`minimumRevisionsToKeep`.
+
+These deletions will only take place _when a new revision is added_ to a document. Until a new revision is added, that
+document's revisions can exceed these limits.
+
+---
+
+### RevisionsConfiguration
+
+This object contains a `Map` of revision configurations for each collection in the database, plus an optional default
+configuration.
+
+{CODE-BLOCK: java}
+public class RevisionsConfiguration
+{
+ private Map collections;
+ private RevisionsCollectionConfiguration defaultConfig;
+}
+{CODE-BLOCK/}
+
+| Property | Description | Default |
+| - | - | - |
+| **collections** | A map in which the keys are collection names, and the values are the corresponding configurations | `null` |
+| **defaultConfig** | An optional default configuration that applies to any collection not listed in `collections` | `null` |
+
+Note that when this object is sent to the server, it overrides the configurations for **all** collections, including all existing
+configurations currently on the server. If a collection is not listed in `collections` and `defaultConfig` has not been set, the
+default values listed in the table [above](../../../../document-extensions/revisions/client-api/operations/configure-revisions#revisionscollectionconfiguration)
+are applied.
+
+---
+
+### ConfigureRevisionsOperation
+
+Lastly, the operation itself sends the `RevisionsConfiguration` to the server, overriding **all** existing collection configurations.
+You'll want to store these configurations on the client-side so they don't have to be created from scratch each time you want to
+modify them.
+
+{CODE-BLOCK: java}
+public ConfigureRevisionsOperation(RevisionsConfiguration configuration);
+{CODE-BLOCK/}
+
+| Parameter | Description |
+| - | - |
+| **configuration** | The new revision settings for a particular database |
+
+{PANEL/}
+
+{PANEL: Example}
+
+The following code sample updates the settings of the Document Store's [default database](../../../../client-api/setting-up-default-database)
+- which in this case is a database named "Northwind". To update the configuration of different database, use the
+[`forDatabase()` method](../../../../client-api/operations/how-to/switch-operations-to-a-different-database).
+
+{CODE:java operation@DocumentExtensions\Revisions\ClientAPI\Operations\ConfigureRevisions.java /}
+
+{PANEL/}
+
+## Related Articles
+
+### Document Extensions
+
+* [Document Revisions Overview](../../../../document-extensions/revisions/overview)
+* [Revert Revisions](../../../../document-extensions/revisions/revert-revisions)
+* [Revisions and Other Features](../../../../document-extensions/revisions/revisions-and-other-features)
+
+### Client API
+
+* [Revisions: API Overview](../../../../document-extensions/revisions/client-api/overview)
+* [Session: Loading Revisions](../../../../document-extensions/revisions/client-api/session/loading)
+* [Session: Including Revisions](../../../../document-extensions/revisions/client-api/session/including)
+* [Session: Counting Revisions](../../../../document-extensions/revisions/client-api/session/counting)
+* [What Is a Collection](../../../../client-api/faq/what-is-a-collection)
+* [What Are Operations](../../../../client-api/operations/what-are-operations)
+* [Switch Operation Database](../../../../client-api/operations/how-to/switch-operations-to-a-different-database)
+* [Setting Up a Default Database](../../../../client-api/setting-up-default-database)
+
+### Studio
+
+* [Settings: Document Revisions](../../../../studio/database/settings/document-revisions)
+* [Document Extensions: Revisions](../../../../studio/database/document-extensions/revisions)
+* [Manage Database Group](../../../../studio/database/settings/manage-database-group)
diff --git a/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/client-api/operations/configure-revisions.js.markdown b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/client-api/operations/configure-revisions.js.markdown
new file mode 100644
index 0000000000..e9487c2e0c
--- /dev/null
+++ b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/client-api/operations/configure-revisions.js.markdown
@@ -0,0 +1,101 @@
+# Configure Revisions Operation
+
+---
+
+{NOTE: }
+
+* Use `ConfigureRevisionsOperation` to apply the following [revisions configuration](../../../../studio/database/settings/document-revisions#revisions-configuration) to the database:
+ * **Default configuration** - applies to all document collections.
+ * **Collection-specific configurations** - override the default settings for these collections.
+ * To apply a configuration for conflict document revisions see [configure conflict revisions](../../../../document-extensions/revisions/client-api/operations/conflict-revisions-configuration).
+
+* The configuration passed to this operation will **REPLACE** the current revisions configuration in the database.
+ To **MODIFY** existing configuration, fetch the current configuration from the database record first.
+
+* After applying the configuration,
+ revisions are created and purged for a document whenever the document is created, modified, or deleted.
+
+* To create a revision when there is no configuration defined (or enabled) see: [force revision creation](../../../../document-extensions/revisions/overview#force-revision-creation)
+
+* By default, the operation will be applied to the [default database](../../../../client-api/setting-up-default-database).
+ To operate on a different database see [switch operations to different database](../../../../client-api/operations/how-to/switch-operations-to-a-different-database).
+
+* In this page:
+ * [Replace configuration](../../../../document-extensions/revisions/client-api/operations/configure-revisions#replace-configuration)
+ * [Modify configuration](../../../../document-extensions/revisions/client-api/operations/configure-revisions#modify-configuration)
+ * [Syntax](../../../../document-extensions/revisions/client-api/operations/configure-revisions#syntax)
+
+{NOTE/}
+
+---
+
+{PANEL: Replace configuration}
+
+* In this example, we create a new `RevisionsConfiguration` for the database.
+ If revisions configuration already exists in the database - it will be **replaced**.
+
+{CODE:nodejs replace_configuration@document-extensions\revisions\client-api\operations\configureRevisions.js /}
+
+{PANEL/}
+
+{PANEL: Modify configuration}
+
+* In this example, we fetch the existing revisions configuration from the database record and **modify** it.
+
+{CODE:nodejs modify_configuration@document-extensions\revisions\client-api\operations\configureRevisions.js /}
+
+{PANEL/}
+
+{PANEL: Syntax}
+
+{CODE:nodejs syntax_1@document-extensions\revisions\client-api\operations\configureRevisions.js /}
+
+| Parameter | Type | Description |
+| - | - | - |
+| **configuration** | `RevisionsConfiguration` | The revisions configuration to apply |
+
+{CODE:nodejs syntax_2@document-extensions\revisions\client-api\operations\configureRevisions.js /}
+
+| Property | Type | Description |
+| - | - | - |
+| **defaultConfig** | `RevisionsCollectionConfiguration` | Optional default settings that apply to any collection Not specified in `collections`. |
+| **collections** | `Dictionary` | A Dictionary of collection-specific configurations
The `keys` are the collection names
The `values` are the corresponding configurations.
Overrides the default settings for the collections defined. |
+
+{CODE:nodejs syntax_3@document-extensions\revisions\client-api\operations\configureRevisions.js /}
+
+
+
+| Property | Type | Description |
+| - | - | - |
+| **minimumRevisionsToKeep** | `number` | - This number of revisions will be kept per document.
- Older revisions exceeding this number will be purged upon the next document modification.
- **Default** : `null` = no limit
|
+| **minimumRevisionAgeToKeep** | `string` | - Limit the number of revisions kept per document by their age.
- Revisions that are older than this time will be purged upon the next document modification.
- **Default** : `null` = no age limit
|
+| **maximumRevisionsToDeleteUponDocumentUpdate** | `number` | - The maximum number of revisions to delete upon each document modification.
- **Default** : `null` = no limit,
all revisions that pend purging will be deleted.
|
+| **purgeOnDelete** | `boolean` | - `false` ( **Default** ) - Revisions of a deleted document are moved to the [Revisions Bin](../../../../studio/database/document-extensions/revisions/revisions-bin).
- `true` - When a document is deleted all its revisions are also deleted.
|
+| **disabled** | `boolean` | - `false` ( **Default** ) - Revisions will be created and purged according to the configuration.
- `true` - No revisions will be created or purged.
|
+
+{PANEL/}
+
+## Related Articles
+
+### Document Extensions
+
+* [Document Revisions Overview](../../../../document-extensions/revisions/overview)
+* [Revert Revisions](../../../../document-extensions/revisions/revert-revisions)
+* [Revisions and Other Features](../../../../document-extensions/revisions/revisions-and-other-features)
+
+### Client API
+
+* [Revisions: API Overview](../../../../document-extensions/revisions/client-api/overview)
+* [Session: Loading Revisions](../../../../document-extensions/revisions/client-api/session/loading)
+* [Session: Including Revisions](../../../../document-extensions/revisions/client-api/session/including)
+* [Session: Counting Revisions](../../../../document-extensions/revisions/client-api/session/counting)
+* [What Is a Collection](../../../../client-api/faq/what-is-a-collection)
+* [What Are Operations](../../../../client-api/operations/what-are-operations)
+* [Switch Operation Database](../../../../client-api/operations/how-to/switch-operations-to-a-different-database)
+* [Setting Up a Default Database](../../../../client-api/setting-up-default-database)
+
+### Studio
+
+* [Settings: Document Revisions](../../../../studio/database/settings/document-revisions)
+* [Document Extensions: Revisions](../../../../studio/database/document-extensions/revisions)
+* [Manage Database Group](../../../../studio/database/settings/manage-database-group)
diff --git a/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/client-api/operations/configure-revisions.python.markdown b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/client-api/operations/configure-revisions.python.markdown
new file mode 100644
index 0000000000..6325886103
--- /dev/null
+++ b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/client-api/operations/configure-revisions.python.markdown
@@ -0,0 +1,99 @@
+# Configure Revisions Operation
+
+---
+
+{NOTE: }
+
+* Use `ConfigureRevisionsOperation` to apply the following [revisions configuration](../../../../studio/database/settings/document-revisions#revisions-configuration) to the database:
+ * **Default configuration** - applies to all document collections.
+ * **Collection-specific configurations** - override the default settings for these collections.
+ * To apply a configuration for conflict document revisions see [configure conflict revisions](../../../../document-extensions/revisions/client-api/operations/conflict-revisions-configuration).
+
+* The configuration passed to this operation will **REPLACE** the current revisions configuration in the database.
+ To **MODIFY** existing configuration, fetch the current configuration from the database record first.
+
+* After applying the configuration,
+ revisions are created and purged for a document whenever the document is created, modified, or deleted.
+
+* To create a revision when there is no configuration defined (or enabled) see: [force revision creation](../../../../document-extensions/revisions/overview#force-revision-creation)
+
+* By default, the operation will be applied to the [default database](../../../../client-api/setting-up-default-database).
+ To operate on a different database see [switch operations to different database](../../../../client-api/operations/how-to/switch-operations-to-a-different-database).
+
+* In this page:
+ * [Replace configuration](../../../../document-extensions/revisions/client-api/operations/configure-revisions#replace-configuration)
+ * [Modify configuration](../../../../document-extensions/revisions/client-api/operations/configure-revisions#modify-configuration)
+ * [Syntax](../../../../document-extensions/revisions/client-api/operations/configure-revisions#syntax)
+
+{NOTE/}
+
+---
+
+{PANEL: Replace configuration}
+
+In this example, we create a new `RevisionsConfiguration` for the database.
+If revisions configuration already exists in the database - it will be **replaced**.
+{CODE:python replace_configuration@DocumentExtensions\Revisions\ClientAPI\Operations\ConfigureRevisions.py /}
+
+{PANEL/}
+
+{PANEL: Modify configuration}
+
+In this example, we fetch the existing revisions configuration from the database record and **modify** it.
+{CODE:python modify_configuration@DocumentExtensions\Revisions\ClientAPI\Operations\ConfigureRevisions.py /}
+
+{PANEL/}
+
+{PANEL: Syntax}
+
+{CODE:python syntax_1@DocumentExtensions\Revisions\ClientAPI\Operations\ConfigureRevisions.py /}
+
+| Parameter | Type | Description |
+| - | - | - |
+| **configuration** | `RevisionsConfiguration` | The revisions configuration to apply |
+
+{CODE:python syntax_2@DocumentExtensions\Revisions\ClientAPI\Operations\ConfigureRevisions.py /}
+
+| Property | Type | Description |
+| - | - | - |
+| **default_config** | `RevisionsCollectionConfiguration` | Optional default settings that apply to any collection Not specified in `collections`. |
+| **collections** | `Dict[str, RevisionsCollectionConfiguration]` | A Dictionary of collection-specific configurations
The `keys` are the collection names
The `values` are the corresponding configurations.
Overrides the default settings for the collections defined. |
+
+{CODE:python syntax_3@DocumentExtensions\Revisions\ClientAPI\Operations\ConfigureRevisions.py /}
+
+
+
+| Property | Type | Description |
+| - | - | - |
+| **minimum_revisions_to_keep** | `int` | - This number of revisions will be kept per document.
- Older revisions exceeding this number will be purged upon the next document modification.
- **Default** : `None` = no limit
|
+| **minimum_revisions_age_to_keep** | `timedelta` | - Limit the number of revisions kept per document by their age.
- Revisions that are older than this time will be purged upon the next document modification.
- **Default** : `None` = no age limit
|
+| **disabled** | `bool` | - `fFalse` ( **Default** ) - Revisions will be created and purged according to the configuration.
- `True` - No revisions will be created or purged.
|
+| **purge_on_delete** | `bool` | - `False` ( **Default** ) - Revisions of a deleted document are moved to the [Revisions Bin](../../../../studio/database/document-extensions/revisions/revisions-bin).
- `True` - When a document is deleted all its revisions are also deleted.
|
+| **maximum_revisions_to_delete_upon_document_creation** | `int` | - The maximum number of revisions to delete upon each document modification.
- **Default** : `None` = no limit,
all revisions that pend purging will be deleted.
|
+
+{PANEL/}
+
+## Related Articles
+
+### Document Extensions
+
+* [Document Revisions Overview](../../../../document-extensions/revisions/overview)
+* [Revert Revisions](../../../../document-extensions/revisions/revert-revisions)
+* [Revisions and Other Features](../../../../document-extensions/revisions/revisions-and-other-features)
+
+### Client API
+
+* [Revisions: API Overview](../../../../document-extensions/revisions/client-api/overview)
+* [Session: Loading Revisions](../../../../document-extensions/revisions/client-api/session/loading)
+* [Session: Including Revisions](../../../../document-extensions/revisions/client-api/session/including)
+* [Session: Counting Revisions](../../../../document-extensions/revisions/client-api/session/counting)
+* [What Is a Collection](../../../../client-api/faq/what-is-a-collection)
+* [What Are Operations](../../../../client-api/operations/what-are-operations)
+* [Switch Operation Database](../../../../client-api/operations/how-to/switch-operations-to-a-different-database)
+* [Setting Up a Default Database](../../../../client-api/setting-up-default-database)
+
+### Studio
+
+* [Settings: Document Revisions](../../../../studio/database/settings/document-revisions)
+* [Document Extensions: Revisions](../../../../studio/database/document-extensions/revisions)
+* [Manage Database Group](../../../../studio/database/settings/manage-database-group)
diff --git a/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/client-api/operations/delete-revisions.dotnet.markdown b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/client-api/operations/delete-revisions.dotnet.markdown
new file mode 100644
index 0000000000..574a0d776c
--- /dev/null
+++ b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/client-api/operations/delete-revisions.dotnet.markdown
@@ -0,0 +1,133 @@
+# Delete Revisions Operation
+---
+
+{NOTE: }
+
+* Use `DeleteRevisionsOperation` to delete document revisions.
+ The document itself is not deleted, only its revisions will be deleted, as specified by the operation's params.
+
+* Existing revisions will be deleted regardless of the current [revisions settings](../../../../studio/database/settings/document-revisions),
+ even if these settings are disabled.
+
+* When working with a secure server:
+ * The delete revisions action will be logged in the [audit log](../../../../server/security/audit-log/audit-log).
+ * This operation is only available for a client certificate with a [security clearance](../../../../server/security/authorization/security-clearance-and-permissions) of _DatabaseAdmin_ or higher.
+
+* By default, the operation will be applied to the [default database](../../../../client-api/setting-up-default-database).
+ To operate on a different database see [switch operations to different database](../../../../client-api/operations/how-to/switch-operations-to-a-different-database).
+
+* In this page:
+ * [Delete all revisions - single document](../../../../document-extensions/revisions/client-api/operations/delete-revisions#delete-all-revisions---single-document)
+ * [Delete revisions - multiple documents](../../../../document-extensions/revisions/client-api/operations/delete-revisions#delete-revisions---multiple-documents)
+ * [Delete revisions by time frame](../../../../document-extensions/revisions/client-api/operations/delete-revisions#delete-revisions-by-time-frame)
+ * [Delete revisions by change vectors](../../../../document-extensions/revisions/client-api/operations/delete-revisions#delete-revisions-by-change-vectors)
+ * [Syntax](../../../../document-extensions/revisions/client-api/operations/delete-revisions#syntax)
+
+{NOTE/}
+
+---
+
+{PANEL: Delete all revisions - single document}
+
+In this example, we delete ALL revisions of a document.
+Both types of revisions, those resulting from the [revisions settings](../../../../studio/database/settings/document-revisions) and those generated manually via
+[force revision creation](../../../../document-extensions/revisions/overview#force-revision-creation), will be deleted.
+
+{CODE-TABS}
+{CODE-TAB:csharp:Sync delete_revisions_1@DocumentExtensions\Revisions\ClientAPI\Operations\DeleteRevisions.cs /}
+{CODE-TAB:csharp:Async delete_revisions_1_async@DocumentExtensions\Revisions\ClientAPI\Operations\DeleteRevisions.cs /}
+{CODE-TABS/}
+
+{PANEL/}
+
+{PANEL: Delete revisions - multiple documents}
+
+You can specify multiple documents from which to delete revisions.
+
+{CODE-TABS}
+{CODE-TAB:csharp:Sync delete_revisions_2@DocumentExtensions\Revisions\ClientAPI\Operations\DeleteRevisions.cs /}
+{CODE-TAB:csharp:Async delete_revisions_2_async@DocumentExtensions\Revisions\ClientAPI\Operations\DeleteRevisions.cs /}
+{CODE-TABS/}
+
+{PANEL/}
+
+{PANEL: Delete revisions by time frame}
+
+You can specify a time frame from which to delete revisions.
+Only revisions that were created within that time frame (inclusive) will be deleted.
+The time should be specified in UTC.
+
+{CODE-TABS}
+{CODE-TAB:csharp:Sync delete_revisions_3@DocumentExtensions\Revisions\ClientAPI\Operations\DeleteRevisions.cs /}
+{CODE-TAB:csharp:Async delete_revisions_3_async@DocumentExtensions\Revisions\ClientAPI\Operations\DeleteRevisions.cs /}
+{CODE-TABS/}
+
+{PANEL/}
+
+{PANEL: Delete revisions by change vectors}
+
+Each revision has its own unique [change vector](../../../../document-extensions/revisions/client-api/session/loading#get-revisions-by-change-vector).
+You can specify which revisions to delete by providing their corresponding change vectors.
+No exception is thrown if a change vector doesn’t match any revision.
+
+{CODE-TABS}
+{CODE-TAB:csharp:Sync delete_revisions_4@DocumentExtensions\Revisions\ClientAPI\Operations\DeleteRevisions.cs /}
+{CODE-TAB:csharp:Async delete_revisions_4_async@DocumentExtensions\Revisions\ClientAPI\Operations\DeleteRevisions.cs /}
+{CODE-TABS/}
+
+{CONTENT-FRAME: }
+
+Avoid deleting a "Delete Revision" using the `DeleteRevisionsOperation` operation.
+Consider the following scenario:
+
+ 1. A document that has revisions is deleted.
+
+ 2. A "Delete Revision" is created for the document, and it will be listed in the [Revisions Bin](../../../../studio/database/document-extensions/revisions/revisions-bin).
+
+ 3. The revisions of this deleted document remain accessible via the Revisions Bin.
+
+ 4. If you remove this "Delete Revision" by providing its change vector to `DeleteRevisionsOperation`,
+ the "Delete Revision" will be removed from the Revisions Bin, causing the associated revisions to become orphaned.
+ However, you will still be able to access these orphaned revisions from the [All Revisions](../../../../studio/database/document-extensions/revisions/all-revisions) view.
+
+{CONTENT-FRAME/}
+{PANEL/}
+
+{PANEL: Syntax}
+
+{CODE:csharp syntax_1@DocumentExtensions\Revisions\ClientAPI\Operations\DeleteRevisions.cs /}
+
+| Parameter | Type | Description |
+|---------------------------------|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| **documentId** | `string` | The ID of the document whose revisions you want to delete. |
+| **documentIds** | `List` | A list of document IDs whose revisions you want to delete. |
+| **removeForceCreatedRevisions** | `bool` | `true` - Include [force-created revisions](../../../../document-extensions/revisions/overview#force-revision-creation) in the deletion.
`false` - Exclude force-created revisions. |
+| **from** | `DateTime` | The start of the date range for the revisions to delete (inclusive). |
+| **to** | `DateTime` | The end of the date range for the revisions to delete (inclusive). |
+| **revisionsChangeVectors** | `List` | A list of change vectors corresponding to the revisions that you want to delete. |
+
+{PANEL/}
+
+## Related Articles
+
+### Document Extensions
+
+* [Revisions Overview](../../../../document-extensions/revisions/overview)
+* [Revert Revisions](../../../../document-extensions/revisions/revert-revisions)
+* [Revisions and Other Features](../../../../document-extensions/revisions/revisions-and-other-features)
+* [Revisions: API Overview](../../../../document-extensions/revisions/client-api/overview)
+* [Session: Loading Revisions](../../../../document-extensions/revisions/client-api/session/loading)
+* [Session: Including Revisions](../../../../document-extensions/revisions/client-api/session/including)
+* [Session: Counting Revisions](../../../../document-extensions/revisions/client-api/session/counting)
+
+### Client API
+
+* [What Are Operations](../../../../client-api/operations/what-are-operations)
+* [Switch Operation Database](../../../../client-api/operations/how-to/switch-operations-to-a-different-database)
+* [Setting Up a Default Database](../../../../client-api/setting-up-default-database)
+
+### Studio
+
+* [Settings: Document Revisions](../../../../studio/database/settings/document-revisions)
+* [Document Extensions: Revisions](../../../../studio/database/document-extensions/revisions)
+* [Manage Database Group](../../../../studio/database/settings/manage-database-group)
diff --git a/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-1.png b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-1.png
new file mode 100644
index 0000000000..07f2beb97d
Binary files /dev/null and b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-1.png differ
diff --git a/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-2.png b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-2.png
new file mode 100644
index 0000000000..0f386ee78f
Binary files /dev/null and b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-2.png differ
diff --git a/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-3.png b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-3.png
new file mode 100644
index 0000000000..bb94a96c2f
Binary files /dev/null and b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-3.png differ
diff --git a/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-4.png b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-4.png
new file mode 100644
index 0000000000..a54aaf94b7
Binary files /dev/null and b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-4.png differ
diff --git a/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-5.png b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-5.png
new file mode 100644
index 0000000000..6473cd3204
Binary files /dev/null and b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-5.png differ
diff --git a/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-6.png b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-6.png
new file mode 100644
index 0000000000..8221fb94da
Binary files /dev/null and b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-6.png differ
diff --git a/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-7.png b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-7.png
new file mode 100644
index 0000000000..1fee283b6c
Binary files /dev/null and b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-7.png differ
diff --git a/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-8.png b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-8.png
new file mode 100644
index 0000000000..cb7c6c6eeb
Binary files /dev/null and b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-8.png differ
diff --git a/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-bin-cleaner.png b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-bin-cleaner.png
new file mode 100644
index 0000000000..b81382b595
Binary files /dev/null and b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/images/revisions-bin-cleaner.png differ
diff --git a/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/overview.dotnet.markdown b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/overview.dotnet.markdown
new file mode 100644
index 0000000000..ab9203840b
--- /dev/null
+++ b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/overview.dotnet.markdown
@@ -0,0 +1,311 @@
+# Document Revisions Overview
+---
+
+{NOTE: }
+
+* **Document Revisions** are snapshots of documents and their extensions:
+
+ * The trail of revisions created for a document can be inspected to track changes made in the document over time.
+ * A document's live version can be [reverted](../../document-extensions/revisions/revert-revisions) to any of its recorded revisions.
+ {INFO: }
+ For example, tracking document revisions allows you to check how an employee's contract has changed over time,
+ restore a single corrupted document without requiring a backup file, or conduct a full-scale audit of your data.
+ {INFO/}
+
+---
+
+* Managed via the Client API or from the Studio, revisions can be created **automatically** or **manually**:
+
+ * **Automatic revisions creation**:
+ When revisions settings are defined and enabled for a collection, a document revision is automatically created whenever documents are created, modified, or deleted.
+ To configure revisions settings, and set limits for the number of revisions retained per document,
+ apply a [Revisions configuration](../../document-extensions/revisions/overview#revisions-configuration) to all and/or specific collections.
+
+ * **Manual revisions creation**:
+ When revisions settings are disabled, you can still create revisions manually.
+ See [Force revision creation](../../document-extensions/revisions/overview#force-revision-creation) below.
+
+---
+
+* In this page:
+ * [Revisions configuration](../../document-extensions/revisions/overview#revisions-configuration)
+ * [Defining a revisions configuration](../../document-extensions/revisions/overview#defining-a-revisions-configuration)
+ * [Default settings and collection-specific configurations](../../document-extensions/revisions/overview#default-settings-and-collection-specific-configurations)
+ * [Revisions configuration options](../../document-extensions/revisions/overview#revisions-configuration-options)
+ * [Revisions configuration execution](../../document-extensions/revisions/overview#revisions-configuration-execution)
+ * [Enabling and disabling revisions for existing documents](../../document-extensions/revisions/overview#enabling-and-disabling-revisions-for-existing-documents)
+ * [How it works](../../document-extensions/revisions/overview#how-it-works)
+ * [Revisions storage](../../document-extensions/revisions/overview#revisions-storage)
+ * [Force revision creation](../../document-extensions/revisions/overview#force-revision-creation)
+
+{NOTE/}
+
+---
+
+{PANEL: Revisions configuration}
+
+* The revisions configuration enables or disables the creation and purging of revisions for documents,
+ and optionally limits the number of revisions retained per document.
+
+* By default, the revisions feature is **disabled** for all collections: no revisions are created or purged for any document.
+ You can modify this behavior and other revisions settings by applying a revisions configuration to the database.
+ The revisions configuration is stored in the database record.
+
+ {NOTE: }
+
+ #### Conflict Revisions
+
+ Revisions created for **conflicting documents** are a special case that is not covered in this article.
+
+ * Conflict revisions are **enabled** by default.
+ * Read about the conflict revisions API here:
+ [Conflict Revisions Configuration](../../document-extensions/revisions/client-api/operations/conflict-revisions-configuration)
+ * Read about managing conflict revisions via the Studio here:
+ [Editing the Conflicting Document Defaults](../../studio/database/settings/document-revisions#editing-the-conflicting-document-defaults)
+
+ {NOTE/}
+
+---
+
+#### Defining a revisions configuration
+
+You can apply a revisions configuration using the Studio or the Client API:
+
+* Via Studio:
+ * Manage the revisions configuration in the [Document Revisions Settings](../../studio/database/settings/document-revisions) view.
+ * Inspect existing revisions and manually create a new revision in the [Revisions tab](../../studio/database/document-extensions/revisions/revisions#revisions-tab) in the Studio's Document View.
+* Via Client API:
+ * Use the [ConfigureRevisionsOperation](../../document-extensions/revisions/client-api/operations/configure-revisions) _Store_ operation to define and apply a revisions configuration.
+
+---
+
+#### Default settings and collection-specific configurations
+
+The revisions configuration consists of default settings and/or collection-specific configurations:
+
+* **Default settings**:
+ The default settings apply to all documents for which a collection-specific configuration is not defined.
+
+* **Collection-specific configurations**:
+ Collection-specific configurations apply only to documents of the collections they are defined for,
+ overriding the default settings for these collections.
+ {NOTE: }
+ If no default settings are applied, revisions will be **disabled** for any collection where a collection-specific configuration is not defined.
+ {NOTE/}
+
+---
+
+#### Revisions configuration options
+
+A revisions configuration defines -
+
+* Whether to enable or disable revisions creation:
+ * If the revisions configuration is **Enabled** for a collection,
+ creating, modifying, or deleting any document in this collection will trigger the automatic creation of a new document revision,
+ and optionally the purging of existing revisions for the document.
+ * If the revisions configuration is **Disabled** for a collection,
+ RavenDB will **not** automatically create or purge revisions for documents in this collection.
+
+* Whether to limit the number of revisions that can be kept per document.
+ RavenDB will only purge revisions if they exceed the limits you set.
+
+* Learn more about the available configuration options in [Configure revisions operations](../../document-extensions/revisions/client-api/operations/configure-revisions).
+
+---
+
+#### Revisions configuration execution
+
+Creating a revisions configuration does **not** immediately trigger its execution.
+Default and collection-specific configurations are executed when -
+
+1. **Documents are Created, Modified, or Deleted**.
+ When a document is created, modified, or deleted, the configuration (either default or collection-specific) that applies to its collection is examined.
+ If the revisions configuration is enabled for this collection:
+ * A revision of the document will be created.
+ * Existing revisions will optionally be purged according to the limits set in the configuration.
+
+2. **Enforce Configuration is applied**.
+ [Enforcing the configuration](../../studio/database/settings/document-revisions#enforce-configuration) applies the defined revisions configuration immediately throughout the database, **purging** all the revisions pending purging
+ according to default settings or collection-specific configurations, and **deleting** all revisions that no configuration applies to.
+ {WARNING: }
+ * Large databases and collections may contain numerous revisions pending purging, which Enforcing Configuration will purge all at once.
+ Be aware that this operation may require substantial server resources, so time it accordingly.
+ * Revisions that were created over time but to which no configuration currently applies will be deleted.
+ Make sure that your configuration includes the default settings and collection-specific configurations needed to retain the revisions you want to keep.
+ {WARNING/}
+
+---
+
+#### Enabling and disabling revisions for existing documents
+
+* When revisions creation is **Enabled** for a populated collection:
+ * The first revision will be created for an existing document the next time the document is modified
+ (recording the document **after** its modification), or when the document is deleted.
+
+* When revisions creation is **Disabled** for a collection after revisions have been created:
+ * The creation of new revisions and the purging of existing revisions will stop.
+ * Existing revisions will remain intact.
+
+{PANEL/}
+
+{PANEL: How it works}
+
+Let's play with revisions a little to get a taste of its advantages.
+
+1. **Enable Revisions** so we can experiment with the feature.
+ Revisions can be enabled from the [Studio](../../studio/database/settings/document-revisions)
+ or using the [ConfigureRevisionsOperation](../../document-extensions/revisions/client-api/operations/configure-revisions) _Store_ operation.
+
+ 
+
+2. **Create a new document in the `Users` collection**.
+ We will follow the automatic creation of revisions for this document.
+ You can create the document in the [Studio](../../studio/database/documents/create-new-document#create-new-document)
+ or using the [session.Store](../../client-api/session/storing-entities#example) method.
+
+ 
+
+3. **Inspect the new document's [Revisions Tab](../../studio/database/document-extensions/revisions/revisions#revisions-tab)** in the Studio.
+ Creating the document also created its first revision.
+
+ 
+
+ Click the _"See the current document"_ button to return to the parent document view.
+
+4. **Modify and Save the document**.
+ This will create a second revision.
+
+ 
+
+5. **Delete the document**.
+ Though you deleted the document, its **audit trail** is **not lost**: all its revisions are moved to the [Revisions Bin](../../studio/database/document-extensions/revisions/revisions-bin),
+ including a new revision (called "Delete Revision"), created to indicate that the document was deleted.
+
+ {INFO: }
+ * A "Delete Revision" is created only if the deleted document has revisions.
+ * If a document has no revisions, a "Delete Revision" will be created only if the Revisions Configuration is set and enabled for its collection.
+ {INFO/}
+
+ To see the revisions created for the document before it was deleted:
+ * Open the `Documents > Revisions Bin` section in the Studio
+ * Click the deleted document's ID
+
+ 
+
+6. **Restore the document**.
+ Even after a document is deleted, you can still restore it from one of its revisions.
+ To do so, open the revision containing the content you want to restore.
+ Click _Clone_ to create a new document from that revision.
+
+ 
+
+ Save the new document using the exact **same ID** as the deleted document.
+ This will restore all revisions of the deleted document from the Revisions Bin and associate them with the new document.
+
+ Opening the document’s Revisions Tab will show the full audit trail,
+ including the "Delete Revision" created when the original document was deleted and the new revision created when the restored document was saved.
+
+ 
+
+{PANEL/}
+
+{PANEL: Revisions storage}
+
+##### Revisions storage
+
+When a document revision is created, a full version of the modified document is stored in the revisions storage,
+using the same blittable JSON document format as regular documents.
+
+---
+
+##### Revisions Compression
+
+* By default, revisions are compressed.
+ This setting can be customized server-wide via the [CompressRevisionsDefault](../../server/configuration/database-configuration#databases.compression.compressrevisionsdefault) configuration key.
+* At the database level, revisions compression can be customized via the database record,
+ as shown in [this example](../../server/storage/documents-compression#set-compression-for-selected-collections).
+* Individual fields are compressed as they are compressed in regular documents:
+ any text field exceeding 128 bytes is compressed.
+ Learn more about documents compression in [Documents Compression](../../server/storage/documents-compression).
+
+---
+
+##### Storage of document extensions in revisions
+
+Read [here](../../document-extensions/revisions/revisions-and-other-features#revisions-and-time-series) about revisions and **time series**.
+Read [here](../../document-extensions/revisions/revisions-and-other-features#revisions-and-counters) about revisions and **counters**.
+Read [here](../../document-extensions/revisions/revisions-and-other-features#revisions-and-attachments) about revisions and **attachments**.
+
+{PANEL/}
+
+{PANEL: Force revision creation}
+
+So far we've discussed the automatic creation of revisions when the feature is enabled.
+However, you can also **force the creation** of a document revision, whether the feature is enabled or not.
+
+This is useful when you choose to disable automatic revisions creation but still want to create a revision for a specific document,
+e.g. take a snapshot of the document as a precaution before editing it.
+
+* You can force the creation of a revision via the [Studio](../../document-extensions/revisions/overview#force-revision-creation-via-the-studio)
+ or use the [Client API](../../document-extensions/revisions/overview#force-revision-creation-via-the-client-api).
+* A revision **will** be created even if the revisions configuration is disabled for the document's collection.
+* A revision **will** be created even if the document has not been modified
+ (unless the document has revisions and the latest revision contains the current document contents).
+* Similar to revisions created automatically due to the revisions configuration,
+ deleting a document with a manually created revision will move the revision to the [Revisions Bin](../../studio/database/document-extensions/revisions/revisions-bin),
+ and a "Delete Revision" will be created.
+
+---
+
+##### Force revision creation via the Studio
+
+To create a revision manually via the Studio,
+click the **Create Revision** button in the Revisions Tab in the document view.
+
+
+
+---
+
+##### Force revision creation via the Client API
+
+To create a revision manually via the Client API, use the advanced session `ForceRevisionCreationFor` method,
+followed by a call to `SaveChanges`.
+
+**Example**:
+
+{CODE-TABS}
+{CODE-TAB:csharp:Force_by_entity ForceRevisionCreationByEntity@DocumentExtensions\Revisions\Revisions.cs /}
+{CODE-TAB:csharp:Force_by_ID ForceRevisionCreationByID@DocumentExtensions\Revisions\Revisions.cs /}
+{CODE-TABS/}
+
+**Syntax**:
+
+{CODE:csharp syntax_1@DocumentExtensions\Revisions\Revisions.cs /}
+
+| Parameter | Type | Description |
+|--------------|------------------------------|--------------------------------------------------------------------------------------------------|
+| **entity** | `T` | The tracked entity for which you want to create a revision. |
+| **id** | `string` | The ID of the document for which you want to create a revision. |
+| **strategy** | `enum ForceRevisionStrategy` | Defines the revision creation strategy (see below).
Default: `ForceRevisionStrategy.Before` |
+
+{CODE:csharp syntax_2@DocumentExtensions\Revisions\Revisions.cs /}
+
+{PANEL/}
+
+## Related Articles
+
+### Document Extensions
+
+* [Revert Revisions](../../document-extensions/revisions/revert-revisions)
+* [Revisions and Other Features](../../document-extensions/revisions/revisions-and-other-features)
+
+### Client API
+
+* [Revisions: API Overview](../../document-extensions/revisions/client-api/overview)
+* [Operations: Configuring Revisions](../../document-extensions/revisions/client-api/operations/configure-revisions)
+* [Session: Loading Revisions](../../document-extensions/revisions/client-api/session/loading)
+
+### Studio
+
+* [Settings: Document Revisions](../../studio/database/settings/document-revisions)
+* [Document Extensions: Revisions](../../studio/database/document-extensions/revisions)
diff --git a/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/overview.js.markdown b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/overview.js.markdown
new file mode 100644
index 0000000000..c9c9304095
--- /dev/null
+++ b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/overview.js.markdown
@@ -0,0 +1,318 @@
+# Document Revisions Overview
+---
+
+{NOTE: }
+
+* **Document Revisions** are snapshots of documents and their extensions:
+
+ * The trail of revisions created for a document can be inspected to track changes made in the document over time.
+ * A document's live version can be [reverted](../../document-extensions/revisions/revert-revisions) to any of its recorded revisions.
+ {INFO: }
+ For example, tracking document revisions allows you to check how an employee's contract has changed over time,
+ restore a single corrupted document without requiring a backup file, or conduct a full-scale audit of your data.
+ {INFO/}
+
+---
+
+* Managed via the Client API or from the Studio, revisions can be created **automatically** or **manually**:
+
+ * **Automatic revisions creation**:
+ When revisions settings are defined and enabled for a collection, a document revision is automatically created whenever documents are created, modified, or deleted.
+ To configure revisions settings, and set limits for the number of revisions retained per document,
+ apply a [Revisions configuration](../../document-extensions/revisions/overview#revisions-configuration) to all and/or specific collections.
+
+ * **Manual revisions creation**:
+ When revisions settings are disabled, you can still create revisions manually.
+ See [Force revision creation](../../document-extensions/revisions/overview#force-revision-creation) below.
+
+---
+
+* In this page:
+ * [Revisions configuration](../../document-extensions/revisions/overview#revisions-configuration)
+ * [Defining a revisions configuration](../../document-extensions/revisions/overview#defining-a-revisions-configuration)
+ * [Default settings and collection-specific configurations](../../document-extensions/revisions/overview#default-settings-and-collection-specific-configurations)
+ * [Revisions configuration options](../../document-extensions/revisions/overview#revisions-configuration-options)
+ * [Revisions configuration execution](../../document-extensions/revisions/overview#revisions-configuration-execution)
+ * [Enabling and disabling revisions for existing documents](../../document-extensions/revisions/overview#enabling-and-disabling-revisions-for-existing-documents)
+ * [How it works](../../document-extensions/revisions/overview#how-it-works)
+ * [Revisions storage](../../document-extensions/revisions/overview#revisions-storage)
+ * [Force revision creation](../../document-extensions/revisions/overview#force-revision-creation)
+
+{NOTE/}
+
+---
+
+{PANEL: Revisions configuration}
+
+* The revisions configuration enables or disables the creation and purging of revisions for documents,
+ and optionally limits the number of revisions retained per document.
+
+* By default, the revisions feature is **disabled** for all collections: no revisions are created or purged for any document.
+ You can modify this behavior and other revisions settings by applying a revisions configuration to the database.
+ The revisions configuration is stored in the database record.
+
+ {NOTE: }
+
+ #### Conflict Revisions
+
+ Revisions created for **conflicting documents** are a special case that is not covered in this article.
+
+ * Conflict revisions are **enabled** by default.
+ * Read about the conflict revisions API here:
+ [Conflict Revisions Configuration](../../document-extensions/revisions/client-api/operations/conflict-revisions-configuration)
+ * Read about managing conflict revisions via the Studio here:
+ [Editing the Conflicting Document Defaults](../../studio/database/settings/document-revisions#editing-the-conflicting-document-defaults)
+
+ {NOTE/}
+
+---
+
+#### Defining a revisions configuration
+
+You can apply a revisions configuration using the Studio or the Client API:
+
+* Via Studio:
+ * Manage the revisions configuration in the [Document Revisions Settings](../../studio/database/settings/document-revisions) view.
+ * Inspect existing revisions and manually create a new revision in the [Revisions tab](../../studio/database/document-extensions/revisions/revisions#revisions-tab) in the Studio's Document View.
+* Via Client API:
+ * Use the [ConfigureRevisionsOperation](../../document-extensions/revisions/client-api/operations/configure-revisions) _Store_ operation to define and apply a revisions configuration.
+
+---
+
+#### Default settings and collection-specific configurations
+
+The revisions configuration consists of default settings and/or collection-specific configurations:
+
+* **Default settings**:
+ The default settings apply to all documents for which a collection-specific configuration is not defined.
+
+* **Collection-specific configurations**:
+ Collection-specific configurations apply only to documents of the collections they are defined for,
+ overriding the default settings for these collections.
+ {NOTE: }
+ If no default settings are applied, revisions will be **disabled** for any collection where a collection-specific configuration is not defined.
+ {NOTE/}
+
+---
+
+#### Revisions configuration options
+
+A revisions configuration defines -
+
+* Whether to enable or disable revisions creation:
+ * If the revisions configuration is **Enabled** for a collection,
+ creating, modifying, or deleting any document in this collection will trigger the automatic creation of a new document revision,
+ and optionally the purging of existing revisions for the document.
+ * If the revisions configuration is **Disabled** for a collection,
+ RavenDB will **not** automatically create or purge revisions for documents in this collection.
+
+* Whether to limit the number of revisions that can be kept per document.
+ RavenDB will only purge revisions if they exceed the limits you set.
+
+* Learn more about the available configuration options in [Configure revisions operations](../../document-extensions/revisions/client-api/operations/configure-revisions).
+
+---
+
+#### Revisions configuration execution
+
+Creating a revisions configuration does **not** immediately trigger its execution.
+Default and collection-specific configurations are executed when -
+
+1. **Documents are Created, Modified, or Deleted**.
+ When a document is created, modified, or deleted, the configuration (either default or collection-specific) that applies to its collection is examined.
+ If the revisions configuration is enabled for this collection:
+ * A revision of the document will be created.
+ * Existing revisions will optionally be purged according to the limits set in the configuration.
+
+2. **Enforce Configuration is applied**.
+ [Enforcing the configuration](../../studio/database/settings/document-revisions#enforce-configuration) applies the defined revisions configuration immediately throughout the database, **purging** all the revisions pending purging
+ according to default settings or collection-specific configurations, and **deleting** all revisions that no configuration applies to.
+ {WARNING: }
+ * Large databases and collections may contain numerous revisions pending purging, which Enforcing Configuration will purge all at once.
+ Be aware that this operation may require substantial server resources, so time it accordingly.
+ * Revisions that were created over time but to which no configuration currently applies will be deleted.
+ Make sure that your configuration includes the default settings and collection-specific configurations needed to retain the revisions you want to keep.
+ {WARNING/}
+
+---
+
+#### Enabling and disabling revisions for existing documents
+
+* When revisions creation is **Enabled** for a populated collection:
+ * The first revision will be created for an existing document the next time the document is modified
+ (recording the document **after** its modification), or when the document is deleted.
+
+* When revisions creation is **Disabled** for a collection after revisions have been created:
+ * The creation of new revisions and the purging of existing revisions will stop.
+ * Existing revisions will remain intact.
+
+{PANEL/}
+
+{PANEL: How it works}
+
+Let's play with revisions a little to get a taste of its advantages.
+
+1. **Enable Revisions** so we can experiment with the feature.
+ Revisions can be enabled from the [Studio](../../studio/database/settings/document-revisions)
+ or using the [ConfigureRevisionsOperation](../../document-extensions/revisions/client-api/operations/configure-revisions) _Store_ operation.
+
+ 
+
+2. **Create a new document in the `Users` collection**.
+ We will follow the automatic creation of revisions for this document.
+ You can create the document in the [Studio](../../studio/database/documents/create-new-document#create-new-document)
+ or using the [session.Store](../../client-api/session/storing-entities#example) method.
+
+ 
+
+3. **Inspect the new document's [Revisions Tab](../../studio/database/document-extensions/revisions/revisions#revisions-tab)** in the Studio.
+ Creating the document also created its first revision.
+
+ 
+
+ Click the _"See the current document"_ button to return to the parent document view.
+
+4. **Modify and Save the document**.
+ This will create a second revision.
+
+ 
+
+5. **Delete the document**.
+ Though you deleted the document, its **audit trail** is **not lost**: all its revisions were moved to the [Revisions Bin](../../studio/database/document-extensions/revisions/revisions-bin),
+ including a new revision (called "Delete Revision"), created to indicate that the document was deleted.
+
+ {INFO: }
+ * A "Delete Revision" is created only if the deleted document has revisions.
+ * If a document has no revisions, a "Delete Revision" will be created only if the Revisions Configuration is set and enabled for its collection.
+ {INFO/}
+
+ To see the revisions created for the document before it was deleted:
+ * Open the `Documents > Revisions Bin` section in the Studio
+ * Click the deleted document's ID
+
+ 
+
+6. **Restore the document**.
+ Even after a document is deleted, you can still restore it from one of its revisions.
+ To do so, open the revision containing the content you want to restore.
+ Click _Clone_ to create a new document from that revision.
+
+ 
+
+ Save the new document using the exact **same ID** as the deleted document.
+ This will restore all revisions of the deleted document from the Revisions Bin and associate them with the new document.
+
+ Opening the document’s Revisions Tab will show the full audit trail,
+ including the "Delete Revision" created when the original document was deleted and the new revision created when the restored document was saved.
+
+ 
+
+{PANEL/}
+
+{PANEL: Revisions storage}
+
+##### Revisions storage
+
+When a document revision is created, a full version of the modified document is stored in the revisions storage,
+using the same blittable JSON document format as regular documents.
+
+---
+
+##### Revisions Compression
+
+* By default, revisions are compressed.
+ This setting can be customized server-wide via the [CompressRevisionsDefault](../../server/configuration/database-configuration#databases.compression.compressrevisionsdefault) configuration key.
+* At the database level, revisions compression can be customized via the database record,
+ as shown in [this example](../../server/storage/documents-compression#set-compression-for-selected-collections).
+* Individual fields are compressed as they are compressed in regular documents:
+ any text field exceeding 128 bytes is compressed.
+ Learn more about documents compression in [Documents Compression](../../server/storage/documents-compression).
+
+---
+
+##### Storage of document extensions in revisions
+
+Read [here](../../document-extensions/revisions/revisions-and-other-features#revisions-and-time-series) about revisions and **time series**.
+Read [here](../../document-extensions/revisions/revisions-and-other-features#revisions-and-counters) about revisions and **counters**.
+Read [here](../../document-extensions/revisions/revisions-and-other-features#revisions-and-attachments) about revisions and **attachments**.
+
+{PANEL/}
+
+{PANEL: Force revision creation}
+
+So far we've discussed the automatic creation of revisions when the feature is enabled.
+However, you can also **force the creation** of a document revision, whether the feature is enabled or not.
+
+This is useful when you choose to disable automatic revisions creation but still want to create a revision for a specific document,
+e.g. take a snapshot of the document as a precaution before editing it.
+
+* You can force the creation of a revision via the [Studio](../../document-extensions/revisions/overview#force-revision-creation-via-the-studio)
+ or use the [Client API](../../document-extensions/revisions/overview#force-revision-creation-via-the-client-api).
+* A revision **will** be created even if the revisions configuration is disabled for the document's collection.
+* A revision **will** be created even if the document has not been modified
+ (unless the document has revisions and the latest revision contains the current document contents).
+* Similar to revisions created automatically due to the revisions configuration,
+ deleting a document with a manually created revision will move the revision to the [Revisions Bin](../../studio/database/document-extensions/revisions/revisions-bin),
+ and a "Delete Revision" will be created.
+
+---
+
+##### Force revision creation via the Studio
+
+To create a revision manually via the Studio,
+click the **Create Revision** button in the Revisions Tab in the document view.
+
+
+
+---
+
+##### Force revision creation via the Client API
+
+To create a revision manually via the Client API, use the advanced session `forceRevisionCreationFor` method,
+followed by a call to `saveChanges`.
+
+**Example**:
+
+{CODE-TABS}
+{CODE-TAB:nodejs:Force_by_entity force_revision_creation_by_entity@document-extensions\revisions\forceRevisionCreation.js /}
+{CODE-TAB:nodejs:Force_by_id force_revision_creation_by_id@document-extensions\revisions\forceRevisionCreation.js /}
+{CODE-TABS/}
+
+**Syntax**:
+
+{CODE:nodejs syntax_1@document-extensions\revisions\forceRevisionCreation.js /}
+
+| Parameter | Type | Description |
+|--------------|----------|-------------------------------------------------------------------------------------------------|
+| **entity** | `object` | The tracked entity for which you want to create a revision. |
+| **id** | `string` | The ID of the document for which you want to create a revision. |
+| **strategy** | `string` | Defines the revision creation strategy.
Can be `"None"` or `"Before"`
Default: `"Before"` |
+
+**Strategy**:
+
+`None`:
+Do not force a revision
+
+`Before`:
+Create a forced revision from the document currently in store BEFORE applying any changes made by the user.
+The only exception is for a new document, where a revision will be created AFTER the update.
+
+{PANEL/}
+
+## Related Articles
+
+### Document Extensions
+
+* [Revert Revisions](../../document-extensions/revisions/revert-revisions)
+* [Revisions and Other Features](../../document-extensions/revisions/revisions-and-other-features)
+
+### Client API
+
+* [Revisions: API Overview](../../document-extensions/revisions/client-api/overview)
+* [Operations: Configuring Revisions](../../document-extensions/revisions/client-api/operations/configure-revisions)
+* [Session: Loading Revisions](../../document-extensions/revisions/client-api/session/loading)
+
+### Studio
+
+* [Settings: Document Revisions](../../studio/database/settings/document-revisions)
+* [Document Extensions: Revisions](../../studio/database/document-extensions/revisions)
diff --git a/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/overview.python.markdown b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/overview.python.markdown
new file mode 100644
index 0000000000..1e0c600dff
--- /dev/null
+++ b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/overview.python.markdown
@@ -0,0 +1,324 @@
+# Document Revisions Overview
+---
+
+{NOTE: }
+
+* **Document Revisions** are snapshots of documents and their extensions:
+
+ * The trail of revisions created for a document can be inspected to track changes made in the document over time.
+ * A document's live version can be [reverted](../../document-extensions/revisions/revert-revisions) to any of its recorded revisions.
+ {INFO: }
+ For example, tracking document revisions allows you to check how an employee's contract has changed over time,
+ restore a single corrupted document without requiring a backup file, or conduct a full-scale audit of your data.
+ {INFO/}
+
+---
+
+* Managed via the Client API or from the Studio, revisions can be created **automatically** or **manually**:
+
+ * **Automatic revisions creation**:
+ When revisions settings are defined and enabled for a collection, a document revision is automatically created whenever documents are created, modified, or deleted.
+ To configure revisions settings, and set limits for the number of revisions retained per document,
+ apply a [Revisions configuration](../../document-extensions/revisions/overview#revisions-configuration) to all and/or specific collections.
+
+ * **Manual revisions creation**:
+ When revisions settings are disabled, you can still create revisions manually.
+ See [Force revision creation](../../document-extensions/revisions/overview#force-revision-creation) below.
+
+---
+
+* In this page:
+ * [Revisions configuration](../../document-extensions/revisions/overview#revisions-configuration)
+ * [Defining a revisions configuration](../../document-extensions/revisions/overview#defining-a-revisions-configuration)
+ * [Default settings and collection-specific configurations](../../document-extensions/revisions/overview#default-settings-and-collection-specific-configurations)
+ * [Revisions configuration options](../../document-extensions/revisions/overview#revisions-configuration-options)
+ * [Revisions configuration execution](../../document-extensions/revisions/overview#revisions-configuration-execution)
+ * [Enabling and disabling revisions for existing documents](../../document-extensions/revisions/overview#enabling-and-disabling-revisions-for-existing-documents)
+ * [How it works](../../document-extensions/revisions/overview#how-it-works)
+ * [Revisions storage](../../document-extensions/revisions/overview#revisions-storage)
+ * [Force revision creation](../../document-extensions/revisions/overview#force-revision-creation)
+
+{NOTE/}
+
+---
+
+{PANEL: Revisions configuration}
+
+* The revisions configuration enables or disables the creation and purging of revisions for documents,
+ and optionally limits the number of revisions retained per document.
+
+* By default, the revisions feature is **disabled** for all collections: no revisions are created or purged for any document.
+ You can modify this behavior and other revisions settings by applying a revisions configuration to the database.
+ The revisions configuration is stored in the database record.
+
+ {NOTE: }
+
+ #### Conflict Revisions
+
+ Revisions created for **conflicting documents** are a special case that is not covered in this article.
+
+ * Conflict revisions are **enabled** by default.
+ * Read about the conflict revisions API here:
+ [Conflict Revisions Configuration](../../document-extensions/revisions/client-api/operations/conflict-revisions-configuration)
+ * Read about managing conflict revisions via the Studio here:
+ [Editing the Conflicting Document Defaults](../../studio/database/settings/document-revisions#editing-the-conflicting-document-defaults)
+
+ {NOTE/}
+
+---
+
+#### Defining a revisions configuration
+
+You can apply a revisions configuration using the Studio or the Client API:
+
+* Via Studio:
+ * Manage the revisions configuration in the [Document Revisions Settings](../../studio/database/settings/document-revisions) view.
+ * Inspect existing revisions and manually create a new revision in the [Revisions tab](../../studio/database/document-extensions/revisions/revisions#revisions-tab) in the Studio's Document View.
+* Via Client API:
+ * Use the [ConfigureRevisionsOperation](../../document-extensions/revisions/client-api/operations/configure-revisions) _Store_ operation to define and apply a revisions configuration.
+
+---
+
+#### Default settings and collection-specific configurations
+
+The revisions configuration consists of default settings and/or collection-specific configurations:
+
+* **Default settings**:
+ The default settings apply to all documents for which a collection-specific configuration is not defined.
+
+* **Collection-specific configurations**:
+ Collection-specific configurations apply only to documents of the collections they are defined for,
+ overriding the default settings for these collections.
+ {NOTE: }
+ If no default settings are applied, revisions will be **disabled** for any collection where a collection-specific configuration is not defined.
+ {NOTE/}
+
+---
+
+#### Revisions configuration options
+
+A revisions configuration defines -
+
+* Whether to enable or disable revisions creation:
+ * If the revisions configuration is **Enabled** for a collection,
+ creating, modifying, or deleting any document in this collection will trigger the automatic creation of a new document revision,
+ and optionally the purging of existing revisions for the document.
+ * If the revisions configuration is **Disabled** for a collection,
+ RavenDB will **not** automatically create or purge revisions for documents in this collection.
+
+* Whether to limit the number of revisions that can be kept per document.
+ RavenDB will only purge revisions if they exceed the limits you set.
+
+* Learn more about the available configuration options in [Configure revisions operations](../../document-extensions/revisions/client-api/operations/configure-revisions).
+
+---
+
+#### Revisions configuration execution
+
+Creating a revisions configuration does **not** immediately trigger its execution.
+Default and collection-specific configurations are executed when -
+
+1. **Documents are Created, Modified, or Deleted**.
+ When a document is created, modified, or deleted, the configuration (either default or collection-specific) that applies to its collection is examined.
+ If the revisions configuration is enabled for this collection:
+ * A revision of the document will be created.
+ * Existing revisions will optionally be purged according to the limits set in the configuration.
+
+2. **Enforce Configuration is applied**.
+ [Enforcing the configuration](../../studio/database/settings/document-revisions#enforce-configuration) applies the defined revisions configuration immediately throughout the database, **purging** all the revisions pending purging
+ according to default settings or collection-specific configurations, and **deleting** all revisions that no configuration applies to.
+ {WARNING: }
+ * Large databases and collections may contain numerous revisions pending purging, which Enforcing Configuration will purge all at once.
+ Be aware that this operation may require substantial server resources, so time it accordingly.
+ * Revisions that were created over time but to which no configuration currently applies will be deleted.
+ Make sure that your configuration includes the default settings and collection-specific configurations needed to retain the revisions you want to keep.
+ {WARNING/}
+
+---
+
+#### Enabling and disabling revisions for existing documents
+
+* When revisions creation is **Enabled** for a populated collection:
+ * The first revision will be created for an existing document the next time the document is modified
+ (recording the document **after** its modification), or when the document is deleted.
+
+* When revisions creation is **Disabled** for a collection after revisions have been created:
+ * The creation of new revisions and the purging of existing revisions will stop.
+ * Existing revisions will remain intact.
+
+{PANEL/}
+
+{PANEL: How it works}
+
+Let's play with revisions a little to get a taste of its advantages.
+
+1. **Enable Revisions** so we can experiment with the feature.
+ Revisions can be enabled from the [Studio](../../studio/database/settings/document-revisions)
+ or using the [ConfigureRevisionsOperation](../../document-extensions/revisions/client-api/operations/configure-revisions) _Store_ operation.
+
+ 
+
+2. **Create a new document in the `Users` collection**.
+ We will follow the automatic creation of revisions for this document.
+ You can create the document in the [Studio](../../studio/database/documents/create-new-document#create-new-document)
+ or using the [session.Store](../../client-api/session/storing-entities#example) method.
+
+ 
+
+3. **Inspect the new document's [Revisions Tab](../../studio/database/document-extensions/revisions/revisions#revisions-tab)** in the Studio.
+ Creating the document also created its first revision.
+
+ 
+
+ Click the _"See the current document"_ button to return to the parent document view.
+
+4. **Modify and Save the document**.
+ This will create a second revision.
+
+ 
+
+5. **Delete the document**.
+ Though you deleted the document, its **audit trail** is **not lost**: all its revisions were moved to the [Revisions Bin](../../studio/database/document-extensions/revisions/revisions-bin),
+ including a new revision (called "Delete Revision"), created to indicate that the document was deleted.
+
+ {INFO: }
+ * A "Delete Revision" is created only if the deleted document has revisions.
+ * If a document has no revisions, a "Delete Revision" will be created only if the Revisions Configuration is set and enabled for its collection.
+ {INFO/}
+
+ To see the revisions created for the document before it was deleted:
+ * Open the `Documents > Revisions Bin` section in the Studio
+ * Click the deleted document's ID
+
+ 
+
+6. **Restore the document**.
+ Even after a document is deleted, you can still restore it from one of its revisions.
+ To do so, open the revision containing the content you want to restore.
+ Click _Clone_ to create a new document from that revision.
+
+ 
+
+ Save the new document using the exact **same ID** as the deleted document.
+ This will restore all revisions of the deleted document from the Revisions Bin and associate them with the new document.
+
+ Opening the document’s Revisions Tab will show the full audit trail,
+ including the "Delete Revision" created when the original document was deleted and the new revision created when the restored document was saved.
+
+ 
+
+{PANEL/}
+
+{PANEL: Revisions storage}
+
+##### Revisions storage
+
+When a document revision is created, a full version of the modified document is stored in the revisions storage,
+using the same blittable JSON document format as regular documents.
+
+---
+
+##### Revisions Compression
+
+* By default, revisions are compressed.
+ This setting can be customized server-wide via the [CompressRevisionsDefault](../../server/configuration/database-configuration#databases.compression.compressrevisionsdefault) configuration key.
+* At the database level, revisions compression can be customized via the database record,
+ as shown in [this example](../../server/storage/documents-compression#set-compression-for-selected-collections).
+* Individual fields are compressed as they are compressed in regular documents:
+ any text field exceeding 128 bytes is compressed.
+ Learn more about documents compression in [Documents Compression](../../server/storage/documents-compression).
+
+---
+
+##### Storage of document extensions in revisions
+
+Read [here](../../document-extensions/revisions/revisions-and-other-features#revisions-and-time-series) about revisions and **time series**.
+Read [here](../../document-extensions/revisions/revisions-and-other-features#revisions-and-counters) about revisions and **counters**.
+Read [here](../../document-extensions/revisions/revisions-and-other-features#revisions-and-attachments) about revisions and **attachments**.
+
+{PANEL/}
+
+{PANEL: Revisions storage}
+
+{NOTE: }
+
+##### Revisions documents storage
+---
+
+* The creation of a document revision stores a full version of the modified document in the revisions storage,
+ in the same **blittable JSON document** format as that of regular documents.
+
+* **Revisions compression**
+ * Revisions are compressed by default.
+ Learn [here](../../server/configuration/database-configuration#databases.compression.compressrevisionsdefault)
+ how to toggle this database option on and off.
+ * Learn [here](../../server/storage/documents-compression) how to apply Document Compression to revisions.
+ * Individual fields are compressed as they are compressed in regular documents:
+ any text field of more than 128 bytes is compressed.
+
+{NOTE/}
+{NOTE: }
+
+##### Revisions document extensions storage
+---
+
+Read [here](../../document-extensions/revisions/revisions-and-other-features#revisions-and-time-series) about revisions and **time series**.
+Read [here](../../document-extensions/revisions/revisions-and-other-features#revisions-and-counters) about revisions and **counters**.
+Read [here](../../document-extensions/revisions/revisions-and-other-features#revisions-and-attachments) about revisions and **attachments**.
+
+{NOTE/}
+{PANEL/}
+
+{PANEL: Force revision creation}
+
+So far we've discussed the automatic creation of revisions when the feature is enabled.
+However, you can also **force the creation** of a document revision, whether the feature is enabled or not.
+
+This is useful when you choose to disable automatic revisions creation but still want to create a revision for a specific document,
+e.g. take a snapshot of the document as a precaution before editing it.
+
+* You can force the creation of a revision via the [Studio](../../document-extensions/revisions/overview#force-revision-creation-via-the-studio)
+ or use the [Client API](../../document-extensions/revisions/overview#force-revision-creation-via-the-client-api).
+* A revision **will** be created even if the revisions configuration is disabled for the document's collection.
+* A revision **will** be created even if the document has not been modified
+ (unless the document has revisions and the latest revision contains the current document contents).
+* Similar to revisions created automatically due to the revisions configuration,
+ deleting a document with a manually created revision will move the revision to the [Revisions Bin](../../studio/database/document-extensions/revisions/revisions-bin),
+ and a "Delete Revision" will be created.
+
+---
+
+##### Force revision creation via the Studio
+
+To create a revision manually via the Studio,
+click the **Create Revision** button in the Revisions Tab in the document view.
+
+
+
+---
+
+##### Force revision creation via the Client API
+
+To create a revision manually via the API, use the advanced session `force_revision_creation_for` method.
+
+{CODE:python force_revision_creation_for@DocumentExtensions\Revisions\Revisions.py /}
+
+{PANEL/}
+
+## Related Articles
+
+### Document Extensions
+
+* [Revert Revisions](../../document-extensions/revisions/revert-revisions)
+* [Revisions and Other Features](../../document-extensions/revisions/revisions-and-other-features)
+
+### Client API
+
+* [Revisions: API Overview](../../document-extensions/revisions/client-api/overview)
+* [Operations: Configuring Revisions](../../document-extensions/revisions/client-api/operations/configure-revisions)
+* [Session: Loading Revisions](../../document-extensions/revisions/client-api/session/loading)
+
+### Studio
+
+* [Settings: Document Revisions](../../studio/database/settings/document-revisions)
+* [Document Extensions: Revisions](../../studio/database/document-extensions/revisions)
diff --git a/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/revisions-bin-cleaner.markdown b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/revisions-bin-cleaner.markdown
new file mode 100644
index 0000000000..92d9588205
--- /dev/null
+++ b/Documentation/7.0/Raven.Documentation.Pages/document-extensions/revisions/revisions-bin-cleaner.markdown
@@ -0,0 +1,107 @@
+# Revisions Bin Cleaner
+---
+
+{NOTE: }
+
+* The [Revisions Bin](../../studio/database/document-extensions/revisions/revisions-bin) stores revisions of deleted documents, ensuring they remain accessible.
+
+* While you can manually delete these revisions directly from the Revisions Bin,
+ you can also set up a cleaner task to remove them automatically, as described below.
+
+* For a complete list of deletion methods, see [All ways to delete revisions](../../studio/database/document-extensions/revisions/all-revisions#all-ways-to-delete-revisions).
+
+* In this page:
+ * [The revisions bin cleaner](../../document-extensions/revisions/revisions-bin-cleaner#the-revisions-bin-cleaner)
+ * [Setting the revisions bin cleaner - from the Studio](../../document-extensions/revisions/revisions-bin-cleaner#setting-the-revisions-bin-cleaner---from-the-studio)
+ * [Setting the revisions bin cleaner - from the Client API](../../document-extensions/revisions/revisions-bin-cleaner#setting-the-revisions-bin-cleaner---from-the-client-api)
+ * [Syntax](../../document-extensions/revisions/revisions-bin-cleaner#syntax)
+
+{NOTE/}
+
+---
+
+{PANEL: The revisions bin cleaner}
+
+Each entry in the [Revisions Bin](../../studio/database/document-extensions/revisions/revisions-bin) represents a "Delete Revision",
+which is a revision that marks a document as deleted and provides access to the revisions that were created for the document before it was deleted.
+
+{WARNING: }
+When the cleaner removes a "Delete Revision" entry,
+ALL the revisions associated with the deleted document are **permanently deleted**.
+{WARNING/}
+
+---
+
+* The Revisions Bin Cleaner is configured with the following parameters:
+ * **Frequency** - How often the cleaner runs.
+ * **Entries age to keep** - The cleaner deletes revision entries older than this value.
+
+* The cleaner task can be managed from:
+ * The [Revisions bin cleaner view](../../document-extensions/revisions/revisions-bin-cleaner#setting-the-revisions-bin-cleaner---from-the-studio) in the Studio
+ * The [Client API](../../document-extensions/revisions/revisions-bin-cleaner#setting-the-revisions-bin-cleaner---from-the-client-api).
+
+* When working with a secure server:
+ * Configuring the Revisions Bin Cleaner is logged in the [audit log](../../server/security/audit-log/audit-log).
+ * Deleting revisions is only available to a client certificate with a security clearance of [Database Admin](../../server/security/authorization/security-clearance-and-permissions#section) or higher.
+
+{PANEL/}
+
+{PANEL: Setting the revisions bin cleaner - from the Studio}
+
+
+
+1. Go to **Settings > Revisions Bin Cleaner**
+2. Toggle ON to enable the cleaner task.
+3. Set the minimum entries age to keep:
+ * When toggled ON:
+ * Revisions Bin entries older than this value will be deleted.
+ * Default: `30` days.
+ * When toggled OFF:
+ * ALL Revisions Bin entries will be deleted.
+4. Set the custom cleaner frequency:
+ * Define how often (in seconds) the Revisions Bin Cleaner runs.
+ * Default: `300` seconds (5 minutes).
+
+{PANEL/}
+
+{PANEL: Setting the revisions bin cleaner - from the Client API}
+
+* Use `ConfigureRevisionsBinCleanerOperation` to configure the Revisions Bin Cleaner from the Client API.
+
+* By default, the operation will be applied to the [default database](../../client-api/setting-up-default-database).
+ To operate on a different database see [switch operations to different database](../../client-api/operations/how-to/switch-operations-to-a-different-database).
+
+* In this example, we enable the cleaner and configure its execution frequency and retention policy.
+
+ {CODE-TABS}
+ {CODE-TAB:csharp:Sync configure_cleaner@DocumentExtensions\Revisions\ClientAPI\Operations\RevisionsBinCleaner.cs /}
+ {CODE-TAB:csharp:Async configure_cleaner_async@DocumentExtensions\Revisions\ClientAPI\Operations\RevisionsBinCleaner.cs /}
+ {CODE-TABS/}
+
+{PANEL/}
+
+{PANEL: Syntax}
+
+{CODE:csharp syntax_1@DocumentExtensions\Revisions\ClientAPI\Operations\RevisionsBinCleaner.cs /}
+{CODE:csharp syntax_2@DocumentExtensions\Revisions\ClientAPI\Operations\RevisionsBinCleaner.cs /}
+
+{PANEL/}
+
+## Related Articles
+
+### Document Extensions
+
+* [Document Revisions Overview](../../document-extensions/revisions/overview)
+* [Revisions and Other Features](../../document-extensions/revisions/revisions-and-other-features)
+
+### Client API
+
+* [Revisions: API Overview](../../document-extensions/revisions/client-api/overview)
+* [Operations: Configuring Revisions](../../document-extensions/revisions/client-api/operations/configure-revisions)
+* [Session: Loading Revisions](../../document-extensions/revisions/client-api/session/loading)
+
+### Studio
+
+* [Settings: Document Revisions](../../studio/database/settings/document-revisions)
+* [Revisions Bin](../../studio/database/document-extensions/revisions/revisions-bin)
+* [All Revisions](../../studio/database/document-extensions/revisions/all-revisions)
diff --git a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/.docs.json b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/.docs.json
index 05d8c6cb7e..086672f93e 100644
--- a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/.docs.json
+++ b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/.docs.json
@@ -1,31 +1,37 @@
[
- {
- "Path": "revisions.markdown",
- "Name": "Revisions",
- "DiscussionId": "19d1538e-bb89-4887-8a9d-e6b8dce5d6cf",
- "Mappings": [
- {
- "Version": 6.2,
- "Key": "studio/database/document-extensions/revisions"
- },
- {
- "Version": 6.0,
- "Key": "studio/database/document-extensions/revisions"
- },
- {
- "Version": 5.4,
- "Key": "studio/database/document-extensions/revisions"
- },
- {
- "Version": 5.3,
- "Key": "studio/database/document-extensions/revisions"
- }
- ]
- },
- {
- "Path": "all-revisions.markdown",
- "Name": "All Revisions",
- "DiscussionId": "19d1538e-bb89-4887-8a9d-e6b8dce5d6cf",
- "Mappings": []
- }
+ {
+ "Path": "revisions.markdown",
+ "Name": "Viewing Document Revisions",
+ "DiscussionId": "19d1538e-bb89-4887-8a9d-e6b8dce5d6cf",
+ "Mappings": [
+ {
+ "Version": 6.2,
+ "Key": "studio/database/document-extensions/revisions"
+ },
+ {
+ "Version": 6.0,
+ "Key": "studio/database/document-extensions/revisions"
+ },
+ {
+ "Version": 5.4,
+ "Key": "studio/database/document-extensions/revisions"
+ },
+ {
+ "Version": 5.3,
+ "Key": "studio/database/document-extensions/revisions"
+ }
+ ]
+ },
+ {
+ "Path": "all-revisions.markdown",
+ "Name": "All Revisions",
+ "DiscussionId": "19d1538e-bb89-4887-8a9d-e6b8dce5d6cf",
+ "Mappings": []
+ },
+ {
+ "Path": "revisions-bin.markdown",
+ "Name": "Revisions Bin",
+ "DiscussionId": "e044e08c-ba48-4b71-9ee5-dc1203439f7e",
+ "Mappings": []
+ }
]
diff --git a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/all-revisions.markdown b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/all-revisions.markdown
index 2c7bba920b..5655a3f0ff 100644
--- a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/all-revisions.markdown
+++ b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/all-revisions.markdown
@@ -1,103 +1,149 @@
-# Document Extensions: All Revisions
+# The All Revisions View
---
{NOTE: }
-* The **All Revisions** view allows you to list the
- [revisions](../../../../studio/database/document-extensions/revisions/revisions)
- that were created over time for all your documents.
-* You can list **all** available revisions, or filter the revisions -
- - By **collection**
- - By **type**, selecting either revisions that indicate the **creation
- or modification** of documents or revisions that indicate that documents
- were **deleted**.
-* All Revisions is a Studio-only feature, there is no available API for these operations.
+**Displaying revisions**:
+
+* The **All Revisions** view displays all [revisions](../../../../studio/database/document-extensions/revisions/revisions) created over time for all your documents in the database.
+ This is a Studio-only feature; there is no Client API method to retrieve all revisions from the server.
+
+* You can view all existing revisions or filter them by their **Collection** or **Type**.
+ Revision types:
+ * **"Regular Revision"** - A revision that is created when the document is created or modified.
+ * **"Delete Revision"** - A revision that is created when the document is deleted.
+
+---
+
+**Deleting revisions**:
+
+* From this view, you can manually delete selected revisions ("Regular Revisions" only).
+ Other available deletion methods are summarized in [All ways to delete revisions](../../../../studio/database/document-extensions/revisions/all-revisions#all-ways-to-delete-revisions).
+
+* Removing revisions from a secure server requires a client certificate with an
+ [Admin](../../../../server/security/authorization/security-clearance-and-permissions#section) or higher security clearance.
+
+ {WARNING: }
+ * Exercise caution when deleting revisions, as this is a permanent action and cannot be undone.
+ Once a revision is removed, it will no longer be available and will Not be listed in this view.
+ {WARNING/}
---
* In this page:
- * [Opening All Revisions](../../../../studio/database/document-extensions/revisions/all-revisions#opening-all-revisions)
- * [Using All Revisions](../../../../studio/database/document-extensions/revisions/all-revisions#using-all-revisions)
+ * [Opening the All Revisions view](../../../../studio/database/document-extensions/revisions/all-revisions#opening-the-all-revisions-view)
+ * [Using the All Revisions view](../../../../studio/database/document-extensions/revisions/all-revisions#using-the-all-revisions-view)
+ * [All ways to delete revisions](../../../../studio/database/document-extensions/revisions/all-revisions#all-ways-to-delete-revisions)
{NOTE/}
---
-{PANEL: All Revisions}
+{PANEL: Opening the All Revisions view}
-### Opening All Revisions
+To access the All Revisions view, go to **Documents > All Revisions**

1. **Documents**
- Click to open the Documents view.
+ Select the _Documents_ section
2. **All Revisions**
- Click to open All Revisions.
+ Click to open the _All Revisions_ view
----
+{PANEL/}
-### Using All Revisions
+{PANEL: Using the All Revisions view}

-1. **Remove revisions**
- Click to delete
- [selected revisions](../../../../studio/database/document-extensions/revisions/all-revisions#select-revision-column).
- * **Removing regular revisions**:
- Use the **Remove revisions** button to remove revisions indicating the
- **creation** or the **modification** of documents.
- {WARNING: }
- Please **be aware** that removing revisions is an **irrevocable operation**.
- {WARNING/}
- * **Removing deletion revisions**:
- Revisions that indicate the **deletion** of documents **cannot** be removed
- from this view, but only from the
- [Revisions Bin](../../../../studio/database/document-extensions/revisions/revisions#revisions-bin)
- view.
- * Revisions can also be deleted [using the client API](../../../../document-extensions/revisions/client-api/operations/delete-revisions).
- * Removing revisions from a [secure server](../../../../server/security/overview)
- is allowed only when the certificate used by the client that attempts the operation
- has an [Admin](../../../../server/security/authorization/security-clearance-and-permissions#section)
- or higher security clearance.
-
-
-2. **Info Hub**
- Click for information about this view.
-
-3. **Filter by Collection**
+1. **Filter by Collection**
Click to select the collection whose revisions you want to list and manage.
+ To list revisions for ALL collections, leave the selection box blank or deselect the currently selected collection.
+
+ 
+
+2. **Filter by Type**
+ * Select **All** to list all document revisions for the selected collection or for all collections.
+ * Select **Regular** to list revisions indicating the creation or modification of documents (for the selected collection/s).
+ * Select **Deleted** to list revisions indicating the deletion of documents (for the selected collection/s).
+
+ 
+
+ 
+
+3. **Revision Data**
+ The following details are listed for each revision:
+ * Id - The ID of the parent document for this revision. Click to view the content of this revision.
+ * Collection - The collection this revision belongs to. Click to navigate to the [documents view](../../../../studio/database/documents/documents-and-collections#the-documents-view) of this collection.
+ * Etag - A unique identifier for this revision, used for internal tracking within the database.
+ * Change Vector - Tracks the document’s version across the cluster for replication and conflict resolution.
+ * Last Modified - The time this revision was created.
+ * Flags - Flags indicate whether a revision contains counters, time series, attachments, or is archived.
+ The "DeleteRevision" flag indicates that the revision is a "Delete Revision".
+
+4. **Select revisions**
+ Check the boxes for the revisions you want to remove.
+ Only "Regular revisions" indicating the creation or modification of documents can be deleted from this view.
+
+5. **Remove Revisions**
+ Click the "Remove revisions" button to delete selected revisions.
- 
-
- To list revisions for **all** collection, leave the selection box blank
- or de-select the currently selected collection.
-
-4. **Filter by Type**
- * Filter by **All** to list **all** document revisions for the selected collection/s.
- * Filter by **Regular** to list revisions that indicate the **creation** or **modification** of documents.
-
- 
-
- * Filter by **Deleted** to list revisions that indicate the **deletion** of documents.
-
- 
-
-5. **Revision Selection Column**
- Select revisions that you want to remove.
- To remove the selected revisions, click the
- [Remove revisions](../../../../studio/database/document-extensions/revisions/all-revisions#remove-revisions)
- button.
-
-6. **Revision Data**
- Browse for revisions' **ID**, **Collection**, **ETag**,
- **Change Vector**, **Last Modification** data, and **Flags**.
- - Click a revision's **ID** to visit this revision in the
- [Revisions tab](../../../../studio/database/document-extensions/revisions/revisions).
- - Click a revision's **Collection name** to visit this
- [collection](../../../../studio/database/documents/documents-and-collections).
-
{PANEL/}
+{PANEL: All ways to delete revisions}
+
+* Revisions can be categorized as follows:
+ * **"Regular Revision"** - A revision that is created when the document is created or modified.
+ * **"Delete Revision"** - A revision that is created when the document is deleted.
+
+* The sections below outline the deletion options available for each type.
+
+ {WARNING: }
+ * Exercise caution when deleting revisions, as this is a **permanent** action and **cannot** be undone.
+ * Removing revisions from a secure server requires a client certificate with an
+ [Admin](../../../../server/security/authorization/security-clearance-and-permissions#section) or higher security clearance.
+ {WARNING/}
+
+---
+
+{CONTENT-FRAME: }
+
+**Deleting "Regular Revisions"**:
+
+* "Regular Revisions" can be manually deleted from the All Revisions view.
+ See [using the All Revisions view](../../../../studio/database/document-extensions/revisions/all-revisions#using-the-all-revisions-view).
+
+* These revisions can also be deleted through the [Delete revisions operation](../../../../document-extensions/revisions/client-api/operations/delete-revisions) in the Client API.
+
+* Individual revisions can also be deleted when viewing the revision content.
+ See [Inspecting the revision](../../../../studio/database/document-extensions/revisions/revisions#revision-inspection).
+
+{CONTENT-FRAME/}
+{CONTENT-FRAME: }
+
+**Deleting "Delete Revisions"**:
+
+* "Delete Revisions" can be removed via:
+ * The [Revisions Bin view](../../../../studio/database/document-extensions/revisions/revisions-bin) - manual deletion
+ * The [Revisions Bin Cleaner](../../../../document-extensions/revisions/revisions-bin-cleaner) task - automatic deletion at a defined frequency
+
+* Removing a "Delete Revision" will delete ALL revisions associated with the deleted document.
+
+{CONTENT-FRAME/}
+{CONTENT-FRAME: }
+
+**Configuration-based revision removal**:
+
+* Revisions may be removed based on the configured revisions setting,
+ e.g., limiting the number of revisions to keep or setting an expiration based on age.
+ See [Default revision configuration](../../../../studio/database/settings/document-revisions#define-default-configuration) and
+ [Collection-specific configuration](../../../../studio/database/settings/document-revisions#define-collection-specific-configuration).
+
+* Revisions may also be deleted as a result of enforcing the current revision configuration.
+ Learn more in [Enforce configuration](../../../../studio/database/settings/document-revisions#enforce-configuration).
+
+{CONTENT-FRAME/}
+{PANEL/}
## Related Articles
@@ -106,6 +152,7 @@
* [Document Revisions Overview](../../../../document-extensions/revisions/overview)
* [Revert Revisions](../../../../document-extensions/revisions/revert-revisions)
* [Revisions and Other Features](../../../../document-extensions/revisions/revisions-and-other-features)
+* [Revisions Bin Cleaner](../../../../document-extensions/revisions/revisions-bin-cleaner)
### Client API
@@ -118,4 +165,5 @@
### Studio
* [Revisions](../../../../studio/database/document-extensions/revisions/revisions)
+* [Revisions Bin](../../../../studio/database/document-extensions/revisions/revisions-bin)
* [Settings: Document Revisions](../../../../studio/database/settings/document-revisions)
diff --git a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/all-revisions.png b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/all-revisions.png
index 4701ea0289..81d6e0deb2 100644
Binary files a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/all-revisions.png and b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/all-revisions.png differ
diff --git a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/all-revisions_deleted.png b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/all-revisions_deleted.png
index f149384067..8c09cb78cb 100644
Binary files a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/all-revisions_deleted.png and b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/all-revisions_deleted.png differ
diff --git a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/all-revisions_regular.png b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/all-revisions_regular.png
index 97abe00775..2bdca4afd1 100644
Binary files a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/all-revisions_regular.png and b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/all-revisions_regular.png differ
diff --git a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/all-revisions_select-collection.png b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/all-revisions_select-collection.png
index 5c6e01248f..8f0664f52f 100644
Binary files a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/all-revisions_select-collection.png and b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/all-revisions_select-collection.png differ
diff --git a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/click-revision.png b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/click-revision.png
index 2db760aea2..4fb50201fa 100644
Binary files a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/click-revision.png and b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/click-revision.png differ
diff --git a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/click-to-compare.png b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/click-to-compare.png
index 8b302f71bf..b42edf2966 100644
Binary files a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/click-to-compare.png and b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/click-to-compare.png differ
diff --git a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/compare-with-drop-list.png b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/compare-with-drop-list.png
deleted file mode 100644
index f351b0e8ab..0000000000
Binary files a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/compare-with-drop-list.png and /dev/null differ
diff --git a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/document-revisions.png b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/document-revisions.png
index 1f7685e81c..2e2aff6ef0 100644
Binary files a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/document-revisions.png and b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/document-revisions.png differ
diff --git a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/orphaned-revisions.png b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/orphaned-revisions.png
deleted file mode 100644
index ac799fc204..0000000000
Binary files a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/orphaned-revisions.png and /dev/null differ
diff --git a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/restored-revisions.png b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/restored-revisions.png
deleted file mode 100644
index a5cfc3d67e..0000000000
Binary files a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/restored-revisions.png and /dev/null differ
diff --git a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/revision-comparison.png b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/revision-comparison.png
index e3c1053192..d2fd2b53cd 100644
Binary files a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/revision-comparison.png and b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/revision-comparison.png differ
diff --git a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/revision-inspection.png b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/revision-inspection.png
index ecfea6f827..15ce4939a0 100644
Binary files a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/revision-inspection.png and b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/revision-inspection.png differ
diff --git a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/revisions-bin-1.png b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/revisions-bin-1.png
new file mode 100644
index 0000000000..94d657b61a
Binary files /dev/null and b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/revisions-bin-1.png differ
diff --git a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/revisions-bin-2.png b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/revisions-bin-2.png
new file mode 100644
index 0000000000..3a7701ae58
Binary files /dev/null and b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/revisions-bin-2.png differ
diff --git a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/revisions-bin-3.png b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/revisions-bin-3.png
new file mode 100644
index 0000000000..4b6c5e03fe
Binary files /dev/null and b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/revisions-bin-3.png differ
diff --git a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/revisions-bin.png b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/revisions-bin.png
deleted file mode 100644
index f54c3a66d8..0000000000
Binary files a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/revisions-bin.png and /dev/null differ
diff --git a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/snagx/all-revisions.snagx b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/snagx/all-revisions.snagx
index 946ac2a3d0..1afb4f3bec 100644
Binary files a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/snagx/all-revisions.snagx and b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/snagx/all-revisions.snagx differ
diff --git a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/snagx/all-revisions_deleted.snagx b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/snagx/all-revisions_deleted.snagx
new file mode 100644
index 0000000000..8686711d63
Binary files /dev/null and b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/snagx/all-revisions_deleted.snagx differ
diff --git a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/snagx/all-revisions_regular.snagx b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/snagx/all-revisions_regular.snagx
new file mode 100644
index 0000000000..27e52776d4
Binary files /dev/null and b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/snagx/all-revisions_regular.snagx differ
diff --git a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/snagx/all-revisions_select-collection.snagx b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/snagx/all-revisions_select-collection.snagx
index 91ad4a06d3..55c54d36fa 100644
Binary files a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/snagx/all-revisions_select-collection.snagx and b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/images/revisions/snagx/all-revisions_select-collection.snagx differ
diff --git a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/revisions-bin.markdown b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/revisions-bin.markdown
new file mode 100644
index 0000000000..545d29f64e
--- /dev/null
+++ b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/revisions-bin.markdown
@@ -0,0 +1,139 @@
+# The Revisions Bin View
+---
+
+{NOTE: }
+
+* The **Revisions Bin** stores revisions of deleted documents, ensuring they remain accessible.
+ From this view, you can access these revisions or permanently delete them if needed.
+
+* In this page:
+ * [Overview](../../../../studio/database/document-extensions/revisions/revisions-bin#overview)
+ * [The Revisions Bin view](../../../../studio/database/document-extensions/revisions/revisions-bin#the-revisions-bin-view)
+ * [Restoring revisions](../../../../studio/database/document-extensions/revisions/revisions-bin#restoring-revisions)
+
+{NOTE/}
+
+---
+
+{PANEL: Overview}
+
+**What is the Revisions Bin**:
+
+* In RavenDB, revisions can be created automatically or manually, as explained in this [overview](../../../../document-extensions/revisions/overview).
+
+* **When deleting a document that has revisions**:
+ Deleting a document that has revisions will always create a `"Delete Revision"`.
+ This occurs regardless of whether the revisions were created automatically or manually,
+ or if the [Revisions configuration](../../../../studio/database/settings/document-revisions#revisions-configuration) is enabled.
+
+* **When deleting a document that does Not have revisions**:
+ If you delete a document that does not have revisions, a "Delete Revision" will be created only if the revisions configuration is set and enabled.
+ In that case, another revision will be created to capture the document’s state at the time of deletion.
+
+* This "Delete Revision" marks the document's deletion and is stored in the **Revisions Bin**.
+ In addition, all the revisions that were created over time for the deleted document are also moved to the Revisions Bin.
+ Moving the revisions to the Revisions Bin ensures that historical data remains accessible.
+
+---
+
+**Deleting revisions**:
+
+* To clear up space, you can **manually** delete revisions from the Revisions Bin.
+ Removing a selected "Delete Revision" will also delete ALL its associated revisions.
+ This action is irreversible - once a revision is removed from the bin, it cannot be recovered.
+
+* To clean the Revisions Bin **automatically**, you can set up the [Revisions Bin Cleaner](../../../../document-extensions/revisions/revisions-bin-cleaner),
+ which deletes revisions based on a defined frequency and a specified "age to keep".
+
+* While the Revisions Bin provides access only to a deleted document's revisions,
+ the [All Revisions](../../../../studio/database/document-extensions/revisions/all-revisions) view provides access to ALL revisions in the database,
+ where they can also be deleted.
+
+* For a complete list of deletion options, see [All ways to delete revisions](../../../../studio/database/document-extensions/revisions/all-revisions#all-ways-to-delete-revisions).
+
+---
+
+**Restoring revisions**:
+
+* Revisions of a deleted document can be restored from the Revisions Bin and associated with a new document.
+ Learn more [below](../../../../studio/database/document-extensions/revisions/revisions-bin#restoring-revisions).
+
+{PANEL/}
+
+{PANEL: The Revisions Bin view}
+
+
+
+1. Go to **Documents > Revisions Bin**
+2. Each item listed represents a "Delete Revision", marking the deletion of a document.
+3. The ID of the deleted document.
+ Click the ID to view the associated revisions, which were created for the document before it was deleted.
+4. The change vector of the "Delete Revision".
+5. The date and time when the document was deleted.
+6. Click the _Delete_ button to remove the selected "Delete Revision" items.
+
+ {WARNING: }
+ When a "Delete Revision" is removed, ALL its associated revisions are permanently deleted and cannot be recovered.
+ This action is irrevocable.
+ {WARNING/}
+
+---
+
+Clicking the `orders/829-A` ID from the above list will open the following view:
+
+
+
+
+1. This is the ID of the deleted document.
+2. The "DELETE REVISION" label indicates that you are viewing a "Delete Revision".
+3. This text appears for a "Delete Revision," displaying the time when the document was removed.
+ The flags include the `DeleteRevision` flag, confirming it is a "Delete Revision."
+4. The timestamp of the "Delete Revision", indicating when the document was deleted.
+5. These are the revisions that were created for the document before it was deleted.
+ You can click on each one to view and manage it like any other revision,
+ e.g., clone it or compare it with other revisions.
+
+{PANEL/}
+
+{PANEL: Restoring revisions}
+
+* Revisions of a deleted document can be restored and associated with a new document.
+ To restore them, create a new document with the **exact same ID** as the deleted document.
+
+* When a new document is created with the same ID:
+ * The revisions of the deleted document are retrieved from the Revisions Bin and associated with the new document.
+ This occurs even if the [Revisions configuration](../../../../studio/database/settings/document-revisions#revisions-configuration) is not defined or enabled for this document collection at the time.
+ * These revisions are removed from the Revisions Bin once restored.
+ * The "Delete Revision" that marked the original document's deletion will also be removed from the Revisions Bin
+ and will now appear in the new document’s revision history.
+
+
+
+1. The ID of the deleted document that was recreated.
+2. The content of the newly created document.
+3. If the [Revisions configuration](../../../../studio/database/settings/document-revisions#revisions-configuration)
+ is defined and enabled for the document collection at the time of creating the new document, a new revision marking its creation will be generated.
+4. This is the "Delete Revision" that marked the deletion of the original document.
+ This revision is now part of the new document's revision history.
+6. These are the revisions of the deleted document that are now restored.
+
+{PANEL/}
+
+## Related Articles
+
+### Document Extensions
+
+* [Document Revisions Overview](../../../../document-extensions/revisions/overview)
+* [Revisions and Other Features](../../../../document-extensions/revisions/revisions-and-other-features)
+* [Revisions Bin Cleaner](../../../../document-extensions/revisions/revisions-bin-cleaner)
+
+### Client API
+
+* [Revisions: API Overview](../../../../document-extensions/revisions/client-api/overview)
+* [Operations: Configuring Revisions](../../../../document-extensions/revisions/client-api/operations/configure-revisions)
+* [Session: Loading Revisions](../../../../document-extensions/revisions/client-api/session/loading)
+
+### Studio
+
+* [Settings: Document Revisions](../../../../studio/database/settings/document-revisions)
+* [All Revisions](../../../../studio/database/document-extensions/revisions/all-revisions)
diff --git a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/revisions.markdown b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/revisions.markdown
index 17f4414959..07d515f4a2 100644
--- a/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/revisions.markdown
+++ b/Documentation/7.0/Raven.Documentation.Pages/studio/database/document-extensions/revisions/revisions.markdown
@@ -1,4 +1,4 @@
-# Document Extensions: Revisions
+# Viewing Document Revisions
---
{NOTE: }
@@ -10,25 +10,22 @@
* To define and enable revisions creation, see [revisions configuration](../../../../document-extensions/revisions/overview#revisions-configuration).
* A dynamic walkthrough demonstrating revisions management is available [here](../../../../document-extensions/revisions/overview#how-it-works).
-* This article provides an overview of the Studio views related to working with revisions, including:
- * Viewing revisions
- * Comparing revisions
- * Viewing revisions for deleted documents (Revisions Bin)
+* This article provides an overview of how to view and compare revisions of a specific document.
+ * To see all revisions in the database, go to the [All Revisions](../../../../studio/database/document-extensions/revisions/all-revisions) view.
+ * To access revisions of deleted documents, go to the [Revisions Bin](../../../../studio/database/document-extensions/revisions/revisions-bin) view.
---
* In this page:
- * [Revisions Tab](../../../../studio/database/document-extensions/revisions/revisions#revisions-tab)
+ * [Revisions tab](../../../../studio/database/document-extensions/revisions/revisions#revisions-tab)
* [Revision inspection](../../../../studio/database/document-extensions/revisions/revisions#revision-inspection)
* [Revisions comparison](../../../../studio/database/document-extensions/revisions/revisions#revisions-comparison)
- * [Revisions Bin](../../../../studio/database/document-extensions/revisions/revisions#revisions-bin)
- * [Restoring revisions](../../../../studio/database/document-extensions/revisions/revisions#restoring-revisions)
{NOTE/}
---
-{PANEL: Revisions Tab}
+{PANEL: Revisions tab}
* Located within the Document View,
the Revisions Tab displays the full trail of all revisions created for the document.
@@ -44,18 +41,17 @@
2. **Create revision**
Click to manually create a new revision for this document from the Studio.
A new revision will be created if the document doesn't already have a revision for the latest content.
+ This option is available even if a [revisions configuration](../../../../studio/database/settings/document-revisions#revisions-configuration) is not defined or enabled.
[Learn here](../../../../document-extensions/revisions/overview#force-revision-creation-via-the-client-api) about forcing the creation of a new revision via the Client API.
3. **Revision timestamp**
- Click to inspect this revision.
-4. **Compare revision**
- Click to compare this revision with the current live version of the document and with other revisions.
+ Click the timestamp to inspect this revision and view its content.
+4. **Compare**
+ Click to compare the document's current version with its previous revision.
{PANEL/}
{PANEL: Revision inspection}
-Click the revision timestamp to inspect the revision's contents:
-

---
@@ -63,93 +59,55 @@ Click the revision timestamp to inspect the revision's contents:
The revision will be visible in the Document View,
but file editing will Not be available since revisions cannot be modified.
-
+
-1. **Revision**
- The REVISION label indicates that you are viewing a revision and not
- the parent document.
-2. **Clone**
- Click to create a document that copies the revision's contents.
+1. **Parent document ID**
+ This is the ID of the revision's parent document.
+2. **Revision label**
+ The REVISION label indicates that you are viewing a revision, not the parent document.
+3. **Revision content**
+ The revision’s content is displayed in read-only mode.
+4. **Clone**
+ Click to create a document that copies the revision's content.
{INFO: }
- * Cloning the revision will open the 'new document view' with this revision's contents.
+ * Cloning the revision will open the 'new document view' with this revision's content.
* You can then save the clone under a new name to create a new document.
* Saving the clone with the exact same ID as the revision's parent document will revert the document to this revision.
{INFO/}
-3. **See the current document**
- Click to return to the revision's parent document view.
-4. **Revision contents**
- The content of the revision is displayed in read-only mode.
+5. **Delete**
+ Click to delete this revision. **This action cannot be undone**.
+6. **See the current document**
+ Click to return to the parent document view.
+7. **Compare**
+ Click to compare this revision with other revisions.
{PANEL/}
{PANEL: Revisions comparison}
-Click the revision's comparison button to compare it with other revisions:
-
-
-
----
-
-
-
-1. **Exit revisions compare mode**
- Click to exit the comparison window and return to the revisions tTab in the Document View.
-2. **Compare with**
- Click to select a revision to compare with.
- 
-3. **Left-hand revision**
- The left-hand view displays the revision selected in the revisions tab.
-4. **Right-hand revision**
- The right-hand view displays the revision selected using the "Compare with" drop-down list.
-5. **Summary line**
- This line summarizes the differences found between the two revisions.
-
-{PANEL/}
-
-{PANEL: Revisions Bin}
-
-* This view displays the revisions of deleted documents.
-
-* When a document is deleted:
- * A "delete-revision" is created for the document, marking its deletion.
- * The "delete-revision" and all the document's revisions - whether automatically created due to the defined revisions configuration or manually created - are moved to the Revisions Bin.
- * This applies regardless of whether a [revisions configuration](../../../../document-extensions/revisions/overview#revisions-configuration) is enabled or disabled.
-
-
-
-1. **Revisions Bin**
- Click to open the Revisions Bin view.
- Each item listed in the Revisions Bin view references all the revisions created for a deleted document.
-2. **Selection boxes**
- Check to select items.
-3. **Delete**
- Click to remove selected items.
- Deleting revisions from the Revisions Bin will permanently dispose of these revisions,
- making them irrecoverable.
-4. **Deleted document ID**
- This is the ID of the document that was deleted.
- Click it to inspect the revisions created for this document,
- known as "orphaned revisions" since their parent document has been deleted.
- 
- * Revisions stored in the revisions bin can be [inspected](../../../../studio/database/document-extensions/revisions/revisions#revision-inspection)
- and cloned just like the revisions of a live document.
-5. **Change vector**
- The change vector of the revision that was created for the document when it was deleted.
-6. **Deletion date**
- The date/time when the document was deleted.
+
---
-### Restoring revisions
-
-Giving a **new document** the ID of a deleted document whose revisions are kept in the Revisions Bin,
-will restore the revisions from the bin and add them to the new document.
-
-Opening the document's revisions tab will display the whole audit trail,
-including the delete-revision created when the old document was deleted and the revision created when the new document was created.
-
-
+
+
+1. **See the current document**
+ Click to return to the parent document view.
+ **Exit**
+ Click to exit the comparison window and return to the revision view.
+2. **Previous commit**
+ When 'Previous commit' is selected, the older revision will automatically be set to the revision preceding the selected one.
+ **Manual**
+ When 'Manual' is selected, you can choose any two revisions to compare from the dropdown (#5).
+3. **Older revision**
+ The older of the two revisions.
+4. **Newer revision**
+ The newer of the two revisions.
+5. **Select revision**
+ Select another revision for comparison from this dropdown.
+6. **Summary line**
+ A summary of the differences between the two revisions.
{PANEL/}
@@ -173,3 +131,4 @@ including the delete-revision created when the old document was deleted and the
* [Settings: Document Revisions](../../../../studio/database/settings/document-revisions)
* [All Revisions](../../../../studio/database/document-extensions/revisions/all-revisions)
+* [Revisions Bin](../../../../studio/database/document-extensions/revisions/revisions-bin)
diff --git a/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.cs b/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.cs
new file mode 100644
index 0000000000..caa2a5d45c
--- /dev/null
+++ b/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.cs
@@ -0,0 +1,331 @@
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Raven.Client.Documents;
+using Raven.Client.Documents.Operations.Revisions;
+using Raven.Client.ServerWide.Operations;
+
+namespace Raven.Documentation.Samples.DocumentExtensions.Revisions.ClientAPI.Operations
+{
+ public class ConfigRevisions
+ {
+ public ConfigRevisions()
+ {
+ // REPLACE
+ using (var documentStore = new DocumentStore())
+ {
+ #region replace_configuration
+ // ==============================================================================
+ // Define default settings that will apply to ALL collections
+ // Note: this is optional
+ var defaultRevConfig = new RevisionsCollectionConfiguration()
+ {
+ MinimumRevisionsToKeep = 100,
+ MinimumRevisionAgeToKeep = new TimeSpan(days: 7, 0, 0, 0),
+ MaximumRevisionsToDeleteUponDocumentUpdate = 15,
+ PurgeOnDelete = false,
+ Disabled = false
+
+ // With this configuration:
+ // ------------------------
+ // * A revision will be created anytime a document is modified or deleted.
+ // * Revisions of a deleted document can be accessed in the Revisions Bin view.
+ // * Only the latest 100 revisions will be kept. Older ones will be discarded.
+ // * Older revisions will be removed if they exceed 7 days on next revision creation.
+ // * A maximum of 15 revisions will be deleted each time a document is updated,
+ // until the defined '# of revisions to keep' limit is reached.
+ };
+
+ // ==============================================================================
+ // Define a specific configuration for the EMPLOYEES collection
+ // This will override the default settings
+ var employeesRevConfig = new RevisionsCollectionConfiguration()
+ {
+ MinimumRevisionsToKeep = 50,
+ MinimumRevisionAgeToKeep = new TimeSpan(hours: 12, minutes: 0, seconds: 0),
+ PurgeOnDelete = true,
+ Disabled = false
+
+ // With this configuration:
+ // ------------------------
+ // * A revision will be created anytime an Employee document is modified.
+ // * When a document is deleted all its revisions will be removed.
+ // * At least 50 of the latest revisions will be kept.
+ // * Older revisions will be removed if they exceed 12 hours on next revision creation.
+ };
+
+ // ==============================================================================
+ // Define a specific configuration for the PRODUCTS collection
+ // This will override the default settings
+ var productsRevConfig = new RevisionsCollectionConfiguration()
+ {
+ Disabled = true
+ // No revisions will be created for the Products collection,
+ // even though default configuration is enabled
+ };
+
+ // ==============================================================================
+ // Combine all configurations in the RevisionsConfiguration object
+ var revisionsConfig = new RevisionsConfiguration()
+ {
+ Default = defaultRevConfig,
+ Collections = new Dictionary()
+ {
+ { "Employees", employeesRevConfig },
+ { "Products", productsRevConfig }
+ }
+ };
+
+ // ==============================================================================
+ // Define the configure revisions operation, pass the configuration
+ var configureRevisionsOp = new ConfigureRevisionsOperation(revisionsConfig);
+
+ // Execute the operation by passing it to Maintenance.Send
+ // Any existing configuration will be replaced with the new configuration passed
+ documentStore.Maintenance.Send(configureRevisionsOp);
+ #endregion
+ }
+
+ // MODIFY
+ using (var documentStore = new DocumentStore())
+ {
+ var defaultRevConfig = new RevisionsCollectionConfiguration()
+ {
+ MinimumRevisionsToKeep = 100,
+ MinimumRevisionAgeToKeep = new TimeSpan(days: 7, 0, 0, 0),
+ MaximumRevisionsToDeleteUponDocumentUpdate = 15,
+ PurgeOnDelete = false,
+ Disabled = false
+ };
+
+ var employeesRevConfig = new RevisionsCollectionConfiguration()
+ {
+ MinimumRevisionsToKeep = 50,
+ MinimumRevisionAgeToKeep = new TimeSpan(hours: 12, minutes: 0, seconds: 0),
+ PurgeOnDelete = true
+ };
+
+ var productsRevConfig = new RevisionsCollectionConfiguration()
+ {
+ Disabled = true
+ };
+
+ #region modify_configuration
+ // ==============================================================================
+ // Define the get database record operation:
+ var getDatabaseRecordOp = new GetDatabaseRecordOperation(documentStore.Database);
+ // Get the current revisions configuration from the database record:
+ RevisionsConfiguration revisionsConfig =
+ documentStore.Maintenance.Server.Send(getDatabaseRecordOp).Revisions;
+
+ // ==============================================================================
+ // If no revisions configuration exists, then create a new configuration
+ if (revisionsConfig == null)
+ {
+ revisionsConfig = new RevisionsConfiguration()
+ {
+ Default = defaultRevConfig,
+ Collections = new Dictionary()
+ {
+ { "Employees", employeesRevConfig },
+ { "Products", productsRevConfig }
+ }
+ };
+ }
+
+ // ==============================================================================
+ // If a revisions configuration already exists, then modify it
+ else
+ {
+ revisionsConfig.Default = defaultRevConfig;
+ revisionsConfig.Collections["Employees"] = employeesRevConfig;
+ revisionsConfig.Collections["Products"] = productsRevConfig;
+ }
+
+ // ==============================================================================
+ // Define the configure revisions operation, pass the configuration
+ var configureRevisionsOp = new ConfigureRevisionsOperation(revisionsConfig);
+
+ // Execute the operation by passing it to Maintenance.Send
+ // The existing configuration will be updated
+ documentStore.Maintenance.Send(configureRevisionsOp);
+ #endregion
+ }
+ }
+
+ public async Task ConfigRevisionsAsync()
+ {
+ // REPLACE
+ using (var documentStore = new DocumentStore())
+ {
+ #region replace_configuration_async
+ // ==============================================================================
+ // Define default settings that will apply to ALL collections
+ // Note: this is optional
+ var defaultRevConfig = new RevisionsCollectionConfiguration()
+ {
+ MinimumRevisionsToKeep = 100,
+ MinimumRevisionAgeToKeep = new TimeSpan(days: 7, 0, 0, 0),
+ MaximumRevisionsToDeleteUponDocumentUpdate = 15,
+ PurgeOnDelete = false,
+ Disabled = false,
+
+ // With this configuration:
+ // ------------------------
+ // * A revision will be created anytime a document is modified or deleted.
+ // * Revisions of a deleted document can be accessed in the Revisions Bin view.
+ // * Only the latest 100 revisions will be kept. Older ones will be discarded.
+ // * Older revisions will be removed if they exceed 7 days on next revision creation.
+ // * A maximum of 15 revisions will be deleted each time a document is updated,
+ // until the defined '# of revisions to keep' limit is reached.
+ };
+
+ // ==============================================================================
+ // Define a specific configuration for the EMPLOYEES collection
+ // This will override the default settings
+ var employeesRevConfig = new RevisionsCollectionConfiguration()
+ {
+ MinimumRevisionsToKeep = 50,
+ MinimumRevisionAgeToKeep = new TimeSpan(hours: 12, minutes: 0, seconds: 0),
+ PurgeOnDelete = true,
+ Disabled = false
+
+ // With this configuration:
+ // ------------------------
+ // * A revision will be created anytime an Employee document is modified.
+ // * When a document is deleted all its revisions will be removed.
+ // * At least 50 of the latest revisions will be kept.
+ // * Older revisions will be removed if they exceed 12 hours on next revision creation.
+ };
+
+ // ==============================================================================
+ // Define a specific configuration for the PRODUCTS collection
+ // This will override the default settings
+ var productsRevConfig = new RevisionsCollectionConfiguration()
+ {
+ Disabled = true
+ // No revisions will be created for the Products collection,
+ // even though default configuration is enabled
+ };
+
+ // ==============================================================================
+ // Combine all configurations in the RevisionsConfiguration object
+ var revisionsConfig = new RevisionsConfiguration()
+ {
+ Default = defaultRevConfig,
+ Collections = new Dictionary()
+ {
+ { "Employees", employeesRevConfig },
+ { "Products", productsRevConfig }
+ }
+ };
+
+ // ==============================================================================
+ // Define the configure revisions operation, pass the configuration
+ var configureRevisionsOp = new ConfigureRevisionsOperation(revisionsConfig);
+
+ // Execute the operation by passing it to Maintenance.SendAsync
+ // Any existing configuration will be replaced with the new configuration passed
+ await documentStore.Maintenance.SendAsync(configureRevisionsOp);
+ #endregion
+ }
+
+ // MODIFY
+ using (var documentStore = new DocumentStore())
+ {
+ var defaultRevConfig = new RevisionsCollectionConfiguration()
+ {
+ MinimumRevisionsToKeep = 100,
+ MinimumRevisionAgeToKeep = new TimeSpan(days: 7, 0, 0, 0),
+ MaximumRevisionsToDeleteUponDocumentUpdate = 15,
+ PurgeOnDelete = false,
+ Disabled = false
+ };
+
+ var employeesRevConfig = new RevisionsCollectionConfiguration()
+ {
+ MinimumRevisionsToKeep = 50,
+ MinimumRevisionAgeToKeep = new TimeSpan(hours: 12, minutes: 0, seconds: 0),
+ PurgeOnDelete = true
+ };
+
+ var productsRevConfig = new RevisionsCollectionConfiguration()
+ {
+ Disabled = true
+ };
+
+ #region modify_configuration_async
+ // ==============================================================================
+ // Define the get database record operation:
+ var getDatabaseRecordOp = new GetDatabaseRecordOperation(documentStore.Database);
+ // Get the current revisions configuration from the database record:
+ RevisionsConfiguration revisionsConfig =
+ documentStore.Maintenance.Server.Send(getDatabaseRecordOp).Revisions;
+
+ // ==============================================================================
+ // If no revisions configuration exists, then create a new configuration
+ if (revisionsConfig == null)
+ {
+ revisionsConfig = new RevisionsConfiguration()
+ {
+ Default = defaultRevConfig,
+ Collections = new Dictionary()
+ {
+ { "Employees", employeesRevConfig },
+ { "Products", productsRevConfig }
+ }
+ };
+ }
+
+ // ==============================================================================
+ // If a revisions configuration already exists, then modify it
+ else
+ {
+ revisionsConfig.Default = defaultRevConfig;
+ revisionsConfig.Collections["Employees"] = employeesRevConfig;
+ revisionsConfig.Collections["Products"] = productsRevConfig;
+ }
+
+ // ==============================================================================
+ // Define the configure revisions operation, pass the configuration
+ var configureRevisionsOp = new ConfigureRevisionsOperation(revisionsConfig);
+
+ // Execute the operation by passing it to Maintenance.SendAsync
+ // The existing configuration will be updated
+ await documentStore.Maintenance.SendAsync(configureRevisionsOp);
+ #endregion
+ }
+ }
+ }
+
+ public class Syntax
+ {
+ public interface IFoo
+ {
+ /*
+ #region syntax_1
+ public ConfigureRevisionsOperation(RevisionsConfiguration configuration);
+ #endregion
+ */
+ }
+
+ #region syntax_2
+ public class RevisionsConfiguration
+ {
+ public RevisionsCollectionConfiguration Default;
+ public Dictionary Collections;
+ }
+ #endregion
+
+ #region syntax_3
+ public class RevisionsCollectionConfiguration
+ {
+ public long? MinimumRevisionsToKeep { get; set; }
+ public TimeSpan? MinimumRevisionAgeToKeep { get; set; }
+ public long? MaximumRevisionsToDeleteUponDocumentUpdate { get; set; }
+ public bool PurgeOnDelete { get; set; }
+ public bool Disabled { get; set; }
+ }
+ #endregion
+ }
+}
diff --git a/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/DeleteRevisions.cs b/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/DeleteRevisions.cs
new file mode 100644
index 0000000000..b578924111
--- /dev/null
+++ b/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/DeleteRevisions.cs
@@ -0,0 +1,192 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Raven.Client;
+using Raven.Client.Documents;
+using Raven.Client.Documents.Operations.Revisions;
+using Xunit;
+
+namespace Raven.Documentation.Samples.DocumentExtensions.Revisions.ClientAPI.Operations
+{
+ public class DeleteRevisions
+ {
+ public DeleteRevisions()
+ {
+ using (var store = new DocumentStore())
+ {
+ #region delete_revisions_1
+ // Define the delete revisions operation:
+
+ // Delete ALL existing revisions for document "orders/830-A"
+ var deleteRevisionsOp = new DeleteRevisionsOperation(documentId: "orders/830-A",
+ // Revisions that were created manually will also be removed
+ removeForceCreatedRevisions: true);
+
+ // Execute the operation by passing it to Maintenance.Send
+ var numberOfRevisionsDeleted = store.Maintenance.Send(deleteRevisionsOp);
+
+ // Running the above code on RavenDB's sample data results in the removal of 29 revisions
+ Assert.Equal(29, numberOfRevisionsDeleted.TotalDeletes);
+ #endregion
+ }
+
+ using (var store = new DocumentStore())
+ {
+ #region delete_revisions_2
+ // Delete existing revisions for the specified documents
+ var deleteRevisionsOp = new DeleteRevisionsOperation(
+ documentIds: new List() { "orders/829-A", "orders/828-A", "orders/827-A" },
+ // Revisions that were created manually will Not be removed
+ removeForceCreatedRevisions: false);
+
+ var numberOfRevisionsDeleted = store.Maintenance.Send(deleteRevisionsOp);
+
+ // Running the above on RavenDB's sample data results in the removal of 19 revisions
+ Assert.Equal(19, numberOfRevisionsDeleted.TotalDeletes);
+ #endregion
+ }
+
+ using (var store = new DocumentStore())
+ {
+ #region delete_revisions_3
+ var deleteFrom = DateTime.Parse("2018-07-27T09:11:52.0Z");
+ var deleteTo = DateTime.Parse("2018-07-27T09:11:54.0Z");
+
+ // Delete existing revisions within the specified time frame
+ var deleteRevisionsOp =
+ new DeleteRevisionsOperation(documentId: "orders/826-A", from: deleteFrom, to: deleteTo);
+
+ var numberOfRevisionsDeleted = store.Maintenance.Send(deleteRevisionsOp);
+ #endregion
+ }
+
+ using (var store = new DocumentStore())
+ {
+ using (var session = store.OpenSession())
+ {
+ #region delete_revisions_4
+ // Get the change-vectors for the revisions of the specified document
+ var revisionsChangeVectors = session.Advanced.Revisions
+ .GetMetadataFor("orders/825-A")
+ .Select(m => m.GetString(Constants.Documents.Metadata.ChangeVector))
+ .ToList();
+
+ // Delete the revisions by their change-vector
+ var revisionToDelete =
+ new List() { revisionsChangeVectors[0], revisionsChangeVectors[1] };
+
+ var deleteRevisionsOp =
+ new DeleteRevisionsOperation(documentId: "orders/825-A", revisionToDelete);
+
+ var numberOfRevisionsDeleted = store.Maintenance.Send(deleteRevisionsOp);
+ #endregion
+ }
+ }
+ }
+
+ public async Task ConfigRevisionsAsync()
+ {
+ using (var store = new DocumentStore())
+ {
+ #region delete_revisions_1_async
+ // Define the delete revisions operation:
+
+ // Delete ALL existing revisions for document "orders/830-A"
+ var deleteRevisionsOp = new DeleteRevisionsOperation(documentId: "orders/830-A",
+ // Revisions that were created manually will also be removed
+ removeForceCreatedRevisions: true);
+
+ // Execute the operation by passing it to Maintenance.SendAsync
+ var numberOfRevisionsDeleted = await store.Maintenance.SendAsync(deleteRevisionsOp);
+
+ // Running the above code on RavenDB's sample data results in the removal of 29 revisions
+ Assert.Equal(29, numberOfRevisionsDeleted.TotalDeletes);
+ #endregion
+ }
+
+ using (var store = new DocumentStore())
+ {
+
+ #region delete_revisions_2_async
+ // Delete existing revisions for the specified documents
+ var deleteRevisionsOp = new DeleteRevisionsOperation(
+ documentIds: new List() { "orders/829-A", "orders/828-A", "orders/827-A" },
+ // Revisions that were created manually will Not be removed
+ removeForceCreatedRevisions: false);
+
+ var numberOfRevisionsDeleted = await store.Maintenance.SendAsync(deleteRevisionsOp);
+
+ // Running the above on RavenDB's sample data results in the removal of 19 revisions
+ Assert.Equal(19, numberOfRevisionsDeleted.TotalDeletes);
+ #endregion
+ }
+
+ using (var store = new DocumentStore())
+ {
+ #region delete_revisions_3_async
+ var deleteFrom = DateTime.Parse("2018-07-27T09:11:52.0Z");
+ var deleteTo = DateTime.Parse("2018-07-27T09:11:54.0Z");
+
+ // Delete existing revisions within the specified time frame
+ var deleteRevisionsOp =
+ new DeleteRevisionsOperation(documentId: "orders/826-A", from: deleteFrom, to: deleteTo);
+
+ var numberOfRevisionsDeleted = await store.Maintenance.SendAsync(deleteRevisionsOp);
+ #endregion
+ }
+
+ using (var store = new DocumentStore())
+ {
+ using (var asyncSession = store.OpenAsyncSession())
+ {
+ #region delete_revisions_4_async
+ // Get the change-vectors for the revisions of the specified document
+ var metadata = await asyncSession.Advanced.Revisions
+ .GetMetadataForAsync("orders/825-A");
+
+ var revisionsChangeVectors = metadata
+ .Select(m => m.GetString(Constants.Documents.Metadata.ChangeVector))
+ .ToList();
+
+ // Delete the revisions by their change-vector
+ var revisionToDelete =
+ new List() { revisionsChangeVectors[0], revisionsChangeVectors[1] };
+
+ var deleteRevisionsOp =
+ new DeleteRevisionsOperation(documentId: "orders/825-A", revisionToDelete);
+
+ var numberOfRevisionsDeleted = await store.Maintenance.SendAsync(deleteRevisionsOp);
+ #endregion
+ }
+ }
+ }
+ }
+
+ public class Syntax
+ {
+ public interface IFoo
+ {
+ /*
+ #region syntax_1
+ Available overloads:
+ ====================
+ public DeleteRevisionsOperation(string documentId,
+ bool removeForceCreatedRevisions = false);
+
+ public DeleteRevisionsOperation(string documentId,
+ DateTime? from, DateTime? to, bool removeForceCreatedRevisions = false);
+
+ public DeleteRevisionsOperation(List documentIds,
+ bool removeForceCreatedRevisions = false);
+
+ public DeleteRevisionsOperation(List documentIds,
+ DateTime? from, DateTime? to, bool removeForceCreatedRevisions = false);
+
+ public DeleteRevisionsOperation(string documentId,
+ List revisionsChangeVectors, bool removeForceCreatedRevisions = false);
+ #endregion
+ */
+ }
+ }
+}
diff --git a/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/RevisionsBinCleaner.cs b/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/RevisionsBinCleaner.cs
new file mode 100644
index 0000000000..efeb51c6f3
--- /dev/null
+++ b/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/ClientAPI/Operations/RevisionsBinCleaner.cs
@@ -0,0 +1,85 @@
+using System.Threading.Tasks;
+using Raven.Client.Documents;
+using Raven.Client.Documents.Operations.Revisions;
+
+namespace Raven.Documentation.Samples.DocumentExtensions.Revisions.ClientAPI.Operations
+{
+ public class RevisionsBinCleaner
+ {
+ public RevisionsBinCleaner()
+ {
+ using (var store = new DocumentStore())
+ {
+ #region configure_cleaner
+ //Define the revisions bin cleaner configuration
+ var config = new RevisionsBinConfiguration()
+ {
+ // Enable the cleaner
+ Disabled = false,
+
+ // Set the cleaner execution frequency
+ CleanerFrequencyInSec = 24 * 60 * 60, // one day (in seconds)
+
+ // Revisions bin entries older than the following value will be deleted
+ MinimumEntriesAgeToKeepInMin = 24 * 60 // one day (in minutes)
+ };
+
+ // Define the operation
+ var configRevisionsBinCleanerOp = new ConfigureRevisionsBinCleanerOperation(config);
+
+ // Execute the operation by passing it to Maintenance.Send
+ store.Maintenance.Send(configRevisionsBinCleanerOp);
+ #endregion
+ }
+ }
+
+ public async Task ConfigRevisionsAsync()
+ {
+ using (var store = new DocumentStore())
+ {
+ #region configure_cleaner_async
+ var config = new RevisionsBinConfiguration()
+ {
+ Disabled = false,
+ CleanerFrequencyInSec = 24 * 60 * 60,
+ MinimumEntriesAgeToKeepInMin = 24 * 60
+ };
+
+ var configRevisionsBinCleanerOp = new ConfigureRevisionsBinCleanerOperation(config);
+ await store.Maintenance.SendAsync(configRevisionsBinCleanerOp);
+ #endregion
+ }
+ }
+
+ public class Syntax
+ {
+ public interface IFoo
+ {
+ /*
+ #region syntax_1
+ public ConfigureRevisionsBinCleanerOperation(RevisionsBinConfiguration configuration);
+ #endregion
+ */
+ }
+
+ #region syntax_2
+ public class RevisionsBinConfiguration
+ {
+ // Set to true to enable the revisions bin cleaner.
+ // Default: false (cleaner is disabled).
+ public bool Disabled { get; set; }
+
+ // The minimum age (in minutes) for revisions-bin entries to be kept in the database.
+ // The cleaner deletes entries older than this value.
+ // When set to 0: ALL revisions-bin entries will be removed from the Revisions Bin
+ // Default: 30 days.
+ public int MinimumEntriesAgeToKeepInMin { get; set; }
+
+ // The frequency (in seconds) at which the revisions bin cleaner executes.
+ // Default: 300 seconds (5 minutes).
+ public long CleanerFrequencyInSec { get; set; } = 5 * 60;
+ }
+ #endregion
+ }
+ }
+}
diff --git a/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/Revisions.cs b/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/Revisions.cs
new file mode 100644
index 0000000000..604ff01e08
--- /dev/null
+++ b/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/DocumentExtensions/Revisions/Revisions.cs
@@ -0,0 +1,183 @@
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Raven.Client;
+using Raven.Client.Documents;
+using Raven.Client.Documents.Operations.Revisions;
+using Raven.Client.Documents.Session;
+using Raven.Client.Json;
+using Raven.Documentation.Samples.Orders;
+using Xunit;
+
+namespace Raven.Documentation.Samples.Server
+{
+ public class Revisions
+ {
+ private class User
+ {
+ public string Name { get; set; }
+ }
+
+ private class Loan
+ {
+ public string Id { get; set; }
+ }
+
+ public async Task Sample()
+ {
+ using (var store = new DocumentStore())
+ {
+ #region configuration
+ await store.Maintenance.SendAsync(new ConfigureRevisionsOperation(new RevisionsConfiguration
+ {
+ Default = new RevisionsCollectionConfiguration
+ {
+ Disabled = false,
+ PurgeOnDelete = false,
+ MinimumRevisionsToKeep = 5,
+ MinimumRevisionAgeToKeep = TimeSpan.FromDays(14),
+ },
+ Collections = new Dictionary
+ {
+ {"Users", new RevisionsCollectionConfiguration {Disabled = true}},
+ {"Orders", new RevisionsCollectionConfiguration {Disabled = false}}
+ }
+ }));
+ #endregion
+
+ #region store
+ using (var session = store.OpenSession())
+ {
+ session.Store(new User
+ {
+ Name = "Ayende Rahien"
+ });
+
+ session.SaveChanges();
+ }
+ #endregion
+
+ Loan loan = new Loan { Id = "loans/1" };
+
+ using (var session = store.OpenSession())
+ {
+ #region get_revisions
+ // Get all the revisions that were created for a document, by document ID
+ List revisions = session
+ .Advanced
+ .Revisions
+ .GetFor("users/1", start: 0, pageSize: 25);
+
+ // Get revisions metadata
+ List revisionsMetadata = session
+ .Advanced
+ .Revisions
+ .GetMetadataFor("users/1", start: 0, pageSize: 25);
+
+ // Get revisions by their change vectors
+ User revision = session
+ .Advanced
+ .Revisions
+ .Get(revisionsMetadata[0].GetString(Constants.Documents.Metadata.ChangeVector));
+
+ // Get a revision by its creation time
+ // If no revision was created at that precise time, get the first revision to precede it
+ User revisionAtYearAgo = session
+ .Advanced
+ .Revisions
+ .Get("users/1", DateTime.Now.AddYears(-1));
+ #endregion
+ }
+ }
+ }
+
+ public async Task ForceRevisionCreationForSample()
+ {
+ using (var store = new DocumentStore())
+ {
+ string companyId;
+ using (var session = store.OpenSession())
+ {
+ #region ForceRevisionCreationByEntity
+ // Force revision creation by entity
+ // =================================
+
+ var company = new Company {
+ Name = "CompanyName"
+ };
+
+ session.Store(company);
+ companyId = company.Id;
+ session.SaveChanges();
+
+ // Forcing the creation of a revision by entity can be performed
+ // only when the entity is tracked, after the document is stored.
+ session.Advanced.Revisions.ForceRevisionCreationFor(company);
+
+ // Call SaveChanges for the revision to be created
+ session.SaveChanges();
+
+ var revisionsCount = session.Advanced.Revisions.GetFor(companyId).Count;
+ Assert.Equal(1, revisionsCount);
+ #endregion
+ }
+
+ using (var session = store.OpenSession())
+ {
+ #region ForceRevisionCreationByID
+ // Force revision creation by ID
+ // =============================
+
+ session.Advanced.Revisions.ForceRevisionCreationFor(companyId);
+ session.SaveChanges();
+
+ var revisionsCount = session.Advanced.Revisions.GetFor(companyId).Count;
+ Assert.Equal(1, revisionsCount);
+ #endregion
+ }
+ }
+ }
+
+ public class Company
+ {
+ public string Id { get; set; }
+ public string ExternalId { get; set; }
+ public string Name { get; set; }
+ public Contact Contact { get; set; }
+ public Address Address { get; set; }
+ public string Phone { get; set; }
+ public string Fax { get; set; }
+ }
+
+ private interface IFoo
+ {
+ #region syntax_1
+ // Available overloads:
+ // ====================
+
+ // Force revision creation by entity.
+ // Can be used with tracked entities only.
+ void ForceRevisionCreationFor(T entity,
+ ForceRevisionStrategy strategy = ForceRevisionStrategy.Before);
+
+ // Force revision creation by document ID.
+ void ForceRevisionCreationFor(string id,
+ ForceRevisionStrategy strategy = ForceRevisionStrategy.Before);
+ #endregion
+
+ #region syntax_2
+ public enum ForceRevisionStrategy
+ {
+ // Do not force a revision
+ None,
+
+ // Create a forced revision from the document currently in store
+ // BEFORE applying any changes made by the user.
+ // The only exception is for a new document,
+ // where a revision will be created AFTER the update.
+ Before
+ }
+ #endregion
+ }
+ }
+}
diff --git a/Documentation/7.0/Samples/java/src/test/java/net/ravendb/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.java b/Documentation/7.0/Samples/java/src/test/java/net/ravendb/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.java
new file mode 100644
index 0000000000..680677202a
--- /dev/null
+++ b/Documentation/7.0/Samples/java/src/test/java/net/ravendb/DocumentExtensions/Revisions/ClientAPI/Operations/ConfigureRevisions.java
@@ -0,0 +1,40 @@
+package net.ravendb.ClientApi.Operations;
+
+import net.ravendb.client.documents.DocumentStore;
+import net.ravendb.client.documents.IDocumentStore;
+import net.ravendb.client.documents.operations.revisions;
+import net.ravendb.client.documents.operations.revisions.RevisionsCollectionConfiguration;
+
+public class ConfigureRevisions {
+
+ public ConfigureRevisions() {
+ try (IDocumentStore documentStore = new DocumentStore()) {
+ //region operation
+ // Create a configuration for the Employees collection
+ RevisionsCollectionConfiguration employeesRevConfig = new RevisionsCollectionConfiguration();
+ employeesRevConfig.setMinimumRevisionAgeToKeep(Duration.ofDays(1));
+ employeesRevConfig.setMinimumRevisionsToKeep(42l);
+ employeesRevConfig.setPurgeOnDelete(true);
+
+ // Add the Employees configuration to a map
+ Map collections = new HashMap<>();
+ collectionConfig.put("Employees", employeesRevConfig);
+
+ // Create a default collection configuration
+ RevisionsCollectionConfiguration defaultRevConfig = new RevisionsCollectionConfiguration();
+ defaultRevConfig.setMinimumRevisionAgeToKeep(Duration.ofDays(7));
+ defaultRevConfig.setMinimumRevisionsToKeep(100l);
+ defaultRevConfig.setPurgeOnDelete(false);
+
+ // Combine to create a configuration for the database
+ RevisionsConfiguration northwindRevConfig = new RevisionsConfiguration();
+ northwindRevConfig.setCollections(collections);
+ northwindRevConfig.setDefaultConfig(defaultRevConfig);
+
+ // Execute the operation to update the database
+ documentStore.maintenance().send(new ConfigureRevisionsOperation(northwindRevConfig));
+ //endregion
+ }
+
+ }
+}
diff --git a/Documentation/7.0/Samples/nodejs/document-extensions/revisions/client-api/operations/configureRevisions.js b/Documentation/7.0/Samples/nodejs/document-extensions/revisions/client-api/operations/configureRevisions.js
new file mode 100644
index 0000000000..7ca11f5595
--- /dev/null
+++ b/Documentation/7.0/Samples/nodejs/document-extensions/revisions/client-api/operations/configureRevisions.js
@@ -0,0 +1,132 @@
+import { DocumentStore } from "ravendb";
+
+const documentStore = new DocumentStore();
+
+async function configureRevisions() {
+ {
+ //region replace_configuration
+ // ==============================================================================
+ // Define default settings that will apply to ALL collections
+ // Note: this is optional
+ const defaultRevConfig = new RevisionsCollectionConfiguration();
+ defaultRevConfig.minimumRevisionsToKeep = 100;
+ defaultRevConfig.minimumRevisionAgeToKeep = TimeUtil.millisToTimeSpan(3600 * 1000 * 24 * 7) // 7 days
+ defaultRevConfig.maximumRevisionsToDeleteUponDocumentUpdate = 15;
+ defaultRevConfig.purgeOnDelete = false;
+ defaultRevConfig.disabled = false;
+
+ // With this configuration:
+ // ------------------------
+ // * A revision will be created anytime a document is modified or deleted.
+ // * Revisions of a deleted document can be accessed in the Revisions Bin view.
+ // * Only the latest 100 revisions will be kept. Older ones will be discarded.
+ // * Older revisions will be removed if they exceed 7 days on next revision creation.
+ // * A maximum of 15 revisions will be deleted each time a document is updated,
+ // until the defined '# of revisions to keep' limit is reached.
+
+ // ==============================================================================
+ // Define a specific configuration for the EMPLOYEES collection
+ // This will override the default settings
+ const employeesRevConfig = new RevisionsCollectionConfiguration();
+ employeesRevConfig.minimumRevisionsToKeep = 50;
+ employeesRevConfig.minimumRevisionAgeToKeep = TimeUtil.millisToTimeSpan(3600 * 1000 * 12); // 12 hrs
+ employeesRevConfig.purgeOnDelete = true;
+ employeesRevConfig.disabled = false;
+
+ // With this configuration:
+ // ------------------------
+ // * A revision will be created anytime an Employee document is modified.
+ // * When a document is deleted all its revisions will be removed.
+ // * At least 50 of the latest revisions will be kept.
+ // * Older revisions will be removed if they exceed 12 hours on next revision creation.
+
+ // ==============================================================================
+ // Define a specific configuration for the PRODUCTS collection
+ // This will override the default settings
+ const productsRevConfig = new RevisionsCollectionConfiguration();
+ productsRevConfig.disabled = true;
+
+ // With this configuration:
+ // ------------------------
+ // No revisions will be created for the Products collection,
+ // even though default configuration is enabled
+
+ // ==============================================================================
+ // Combine all configurations in the RevisionsConfiguration object
+ const revisionsConfig = new RevisionsConfiguration();
+ revisionsConfig.defaultConfig = defaultRevConfig;
+ revisionsConfig.collections = new Map();
+ revisionsConfig.collections.set("Employees", employeesRevConfig);
+ revisionsConfig.collections.set("Products", productsRevConfig);
+
+ // ==============================================================================
+ // Define the configure revisions operation, pass the configuration
+ const configureRevisionsOp = new ConfigureRevisionsOperation(revisionsConfig);
+
+ // Execute the operation by passing it to maintenance.send
+ // Any existing configuration will be replaced with the new configuration passed
+ await store.maintenance.send(configureRevisionsOp);
+ //endregion
+ }
+ {
+ //region modify_configuration
+ // ==============================================================================
+ // Define the get database record operation:
+ const getDatabaseRecordOp = new GetDatabaseRecordOperation(documentStore.database);
+ // Get the current revisions configuration from the database record:
+ const record = await store.maintenance.server.send(getDatabaseRecordOp);
+ const revisionsConfig = record.revisions;
+
+ // ==============================================================================
+ // If no revisions configuration exists, then create a new configuration
+ if (!revisionsConfig) {
+ const revisionsConfig = new RevisionsConfiguration();
+ revisionsConfig.defaultConfig = defaultRevConfig;
+ revisionsConfig.collections = new Map();
+ revisionsConfig.collections.set("Employees", employeesRevConfig);
+ revisionsConfig.collections.set("Products", productsRevConfig);
+ }
+
+ // ==============================================================================
+ // If a revisions configuration already exists, then modify it
+ else {
+ revisionsConfig.defaultConfig = defaultRevConfig;
+ revisionsConfig.collections.set("Employees", employeesRevConfig);
+ revisionsConfig.collections.set("Products", productsRevConfig);
+ }
+
+ // ==============================================================================
+ // Define the configure revisions operation, pass the configuration
+ const configureRevisionsOp = new ConfigureRevisionsOperation(revisionsConfig);
+
+ // Execute the operation by passing it to maintenance.send
+ // The existing configuration will be updated
+ await documentStore.maintenance.send(configureRevisionsOp);
+ //endregion
+ }
+}
+
+{
+ //region syntax_1
+ const configureRevisionsOp = new ConfigureRevisionsOperation(configuration);
+ //endregion
+
+ //region syntax_2
+ class RevisionsConfiguration
+ {
+ defaultConfig;
+ collections;
+ }
+ //endregion
+
+ //region syntax_3
+ class RevisionsCollectionConfiguration
+ {
+ minimumRevisionsToKeep;
+ minimumRevisionAgeToKeep;
+ maximumRevisionsToDeleteUponDocumentUpdate;
+ purgeOnDelete;
+ disabled;
+ }
+ //endregion
+}
diff --git a/Documentation/7.0/Samples/nodejs/document-extensions/revisions/forceRevisionCreation.js b/Documentation/7.0/Samples/nodejs/document-extensions/revisions/forceRevisionCreation.js
new file mode 100644
index 0000000000..d30dcec58c
--- /dev/null
+++ b/Documentation/7.0/Samples/nodejs/document-extensions/revisions/forceRevisionCreation.js
@@ -0,0 +1,61 @@
+import { DocumentStore } from "ravendb";
+
+const documentStore = new DocumentStore();
+
+async function forceRevisionCreation() {
+ {
+ //region force_revision_creation_by_entity
+ // Force revision creation by entity
+ // =================================
+
+ const company = new Company();
+ company.name = "CompanyName";
+
+ const session = documentStore.openSession();
+ await session.store(company);
+ await session.saveChanges();
+
+ // Forcing the creation of a revision by entity can be performed
+ // only when the entity is tracked, after the document is stored.
+ await session.advanced.revisions.forceRevisionCreationFor(company);
+
+ // Must call 'saveChanges' for the revision to be created
+ await session.saveChanges();
+
+ // Get existing revisions:
+ const revisions = await session.advanced.revisions.getFor(company.id);
+ const revisionsCount = revisions.length;
+
+ assert.equal(revisionsCount, 1);
+ //endregion
+ }
+ {
+ //region force_revision_creation_by_id
+ const company = new Company();
+ company.name = "CompanyName";
+
+ const session = documentStore.openSession();
+ await session.store(company);
+ await session.saveChanges();
+
+ // Force revision creation by ID
+ const companyId = company.id;
+ await session.advanced.revisions.forceRevisionCreationFor(companyId);
+ await session.saveChanges();
+
+ const revisions = await session.advanced.revisions.getFor(company.id);
+ const revisionsCount = revisions.length;
+
+ assert.equal(revisionsCount, 1);
+ //endregion
+ }
+}
+
+//region syntax_1
+// Available overloads:
+// ====================
+forceRevisionCreationFor(entity);
+forceRevisionCreationFor(entity, strategy);
+forceRevisionCreationFor(id);
+forceRevisionCreationFor(id, strategy);
+//endregion
diff --git a/Documentation/7.0/Samples/python/DocumentExtensions/Revisions/ClientApi/Operations/ConfigureRevisions.py b/Documentation/7.0/Samples/python/DocumentExtensions/Revisions/ClientApi/Operations/ConfigureRevisions.py
new file mode 100644
index 0000000000..f3c182adf5
--- /dev/null
+++ b/Documentation/7.0/Samples/python/DocumentExtensions/Revisions/ClientApi/Operations/ConfigureRevisions.py
@@ -0,0 +1,158 @@
+from datetime import timedelta
+from typing import Dict
+
+from ravendb import RevisionsCollectionConfiguration, RevisionsConfiguration, GetDatabaseRecordOperation
+from ravendb.documents.operations.definitions import MaintenanceOperation
+from ravendb.documents.operations.revisions import ConfigureRevisionsOperation, ConfigureRevisionsOperationResult
+
+from examples_base import ExampleBase
+
+
+class ConfigRevisions(ExampleBase):
+ def setUp(self):
+ super().setUp()
+
+ def test_configure_revisions(self):
+ with self.embedded_server.get_document_store("ConfigurationRevisions") as store:
+ with store.open_session() as session:
+ # region replace_configuration
+ # ==============================================================================
+ # Define default settings that will apply to ALL collections
+ # Note: this is optional
+ default_rev_config = RevisionsCollectionConfiguration(
+ minimum_revisions_to_keep=100,
+ minimum_revisions_age_to_keep=timedelta(days=7),
+ maximum_revisions_to_delete_upon_document_creation=15,
+ purge_on_delete=False,
+ disabled=False,
+ # With this configuration:
+ # ------------------------
+ # * A revision will be created anytime a document is modified or deleted.
+ # * Revisions of a deleted document can be accessed in the Revisions Bin view.
+ # * Only the latest 100 revisions will be kept. Older ones will be discarded.
+ # * Older revisions will be removed if they exceed 7 days on next revision creation.
+ # * A maximum of 15 revisions will be deleted each time a document is updated,
+ # until the defined '# of revisions to keep' limit is reached.
+ )
+
+ employees_rev_config = RevisionsCollectionConfiguration(
+ minimum_revisions_to_keep=50,
+ minimum_revisions_age_to_keep=timedelta(hours=12),
+ purge_on_delete=True,
+ disabled=False,
+ # With this configuration:
+ # ------------------------
+ # * A revision will be created anytime an Employee document is modified.
+ # * When a document is deleted all its revisions will be removed.
+ # * At least 50 of the latest revisions will be kept.
+ # * Older revisions will be removed if they exceed 12 hours on next revision creation.
+ )
+
+ # ==============================================================================
+ # Define a specific configuration for the EMPLOYEES collection
+ # This will override the default settings
+ products_rev_config = RevisionsCollectionConfiguration(
+ disabled=True
+ # No revisions will be created for the Products collection,
+ # even though default configuration is enabled
+ )
+
+ # ==============================================================================
+ # Combine all configurations in the RevisionsConfiguration object
+ revisions_config = RevisionsConfiguration(
+ default_config=default_rev_config,
+ collections={"Employees": employees_rev_config, "Products": products_rev_config},
+ )
+
+ # ==============================================================================
+ # Define the configure revisions operation, pass the configuration
+ configure_revisions_op = ConfigureRevisionsOperation(revisions_config)
+
+ # Execute the operation by passing it to Maintenance.Send
+ # Any existing configuration will be replaced with the new configuration passed
+ store.maintenance.send(configure_revisions_op)
+ # endregion
+
+ # MODIFY
+ default_rev_config = RevisionsCollectionConfiguration(
+ minimum_revisions_to_keep=100,
+ minimum_revisions_age_to_keep=timedelta(days=7),
+ maximum_revisions_to_delete_upon_document_creation=15,
+ purge_on_delete=False,
+ disabled=False,
+ )
+
+ employees_rev_config = RevisionsCollectionConfiguration(
+ minimum_revisions_to_keep=50,
+ minimum_revisions_age_to_keep=timedelta(hours=12),
+ purge_on_delete=True,
+ )
+
+ products_rev_config = RevisionsCollectionConfiguration(disabled=True)
+
+ # region modify_configuration
+ # ==============================================================================
+ # Define the get database record operation:
+ get_database_record_op = GetDatabaseRecordOperation(store.database)
+ # Get the current revisions configuration from the database record:
+ revisions_config = store.maintenance.server.send(get_database_record_op).revisions
+
+ # ==============================================================================
+ # If no revisions configuration exists, then create a new configuration
+ if revisions_config is None:
+ revisions_config = RevisionsConfiguration(
+ default_config=default_rev_config,
+ collections={"Employees": employees_rev_config, "Products": products_rev_config},
+ )
+
+ # ==============================================================================
+ # If a revisions configuration already exists, then modify it
+ else:
+ revisions_config.default_config = default_rev_config
+ revisions_config.collections["Employees"] = employees_rev_config
+ revisions_config.collections["Products"] = products_rev_config
+
+ # ==============================================================================
+ # Define the configure revisions operation, pass the configuration
+ configure_revisions_op = ConfigureRevisionsOperation(revisions_config)
+
+ # Execute the operation by passing it to maintenance.send
+ # The existing configuration will be updated
+ store.maintenance.send(configure_revisions_op)
+
+ # Execute the operation by passing it to maintenance.send
+ # The existing configuration will be updated
+ store.maintenance.send(configure_revisions_op)
+ # endregion
+
+
+class Foo:
+ # region syntax_1
+ class ConfigureRevisionsOperation(MaintenanceOperation[ConfigureRevisionsOperationResult]):
+ def __init__(self, configuration: RevisionsConfiguration): ...
+
+ # endregion
+
+ # region syntax_2
+
+ class RevisionsConfiguration:
+ def __init__(
+ self,
+ default_config: RevisionsCollectionConfiguration = None,
+ collections: Dict[str, RevisionsCollectionConfiguration] = None,
+ ): ...
+
+ # endregion
+ # region syntax_3
+
+ class RevisionsCollectionConfiguration:
+ def __init__(
+ self,
+ minimum_revisions_to_keep: int = None,
+ minimum_revisions_age_to_keep: timedelta = None,
+ disabled: bool = False,
+ purge_on_delete: bool = False,
+ maximum_revisions_to_delete_upon_document_creation: int = None,
+ ): ...
+
+ # endregion
diff --git a/Documentation/7.0/Samples/python/DocumentExtensions/Revisions/Revisions.py b/Documentation/7.0/Samples/python/DocumentExtensions/Revisions/Revisions.py
new file mode 100644
index 0000000000..28e8b4ca44
--- /dev/null
+++ b/Documentation/7.0/Samples/python/DocumentExtensions/Revisions/Revisions.py
@@ -0,0 +1,23 @@
+from ravendb.primitives import constants
+
+from examples_base import ExampleBase
+
+class Force(ExampleBase):
+ def setUp(self):
+ super().setUp()
+
+ # region force_revision_creation_for
+ with self.store.open_session() as session:
+ company = session.load(company_id, Company)
+ company.name = "HR V2"
+
+ session.advanced.revisions.force_revision_creation_for(company)
+ session.save_changes()
+
+ revisions = session.advanced.revisions.get_for(company.Id, Company)
+ revisions_count = len(revisions)
+
+ self.assertEqual(1, revisions_count)
+ # Assert revision contains the value 'Before' the changes...
+ self.assertEqual("HR", revisions[0].name)
+ # endregion