Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
/.claude
.vs
4 changes: 2 additions & 2 deletions docs/authors.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"Paweł Lachowski": {
"name": "Paweł Lachowski",
"title": "Technical Writer @ RavenDB",
"job_title": "Technical Writer",
"url": null,
"image_url": "https://ravendb.net/wp-content/uploads/2024/11/Default-author-thumbnail-150x150.png",
"socials": {}
},
"Omer Ratsaby": {
"name": "Omer Ratsaby",
"title": "DevOps Engineer @ RavenDB",
"job_title": "DevOps Engineer",
"url": null,
"image_url": "https://ravendb.net/wp-content/uploads/2024/11/Default-author-thumbnail-150x150.png",
"socials": {}
Expand Down
29 changes: 29 additions & 0 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,16 @@ const config: Config = {
showLastUpdateTime: true,
},
],
[
"@docusaurus/plugin-ideal-image",
{
max: 1200,
min: 640,
steps: 3,
quality: 85,
disableInDev: false,
},
],
require.resolve("./src/plugins/recent-guides-plugin"),
],
themeConfig: {
Expand All @@ -122,6 +132,21 @@ const config: Config = {
},
image: "img/social-card.jpg",
headTags: [
{
tagName: "link",
attributes: {
rel: "preconnect",
href: "https://GYTCYX561T-dsn.algolia.net",
crossorigin: "anonymous",
},
},
{
tagName: "link",
attributes: {
rel: "preconnect",
href: "https://www.googletagmanager.com",
},
},
{
tagName: "link",
attributes: {
Expand Down Expand Up @@ -225,6 +250,10 @@ const config: Config = {
property: "og:image:height",
content: "630",
},
{
property: "og:image:alt",
content: "RavenDB Documentation",
},
],
colorMode: {
defaultMode: "dark",
Expand Down
1 change: 1 addition & 0 deletions guides/ai-image-search-with-ravendb.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ description: "Read about AI Image Search with RavenDB on the RavenDB.net news se
externalUrl: "https://ravendb.net/articles/ai-image-search-with-ravendb"
publishedAt: 2025-09-09
icon: "ai"
proficiencyLevel: "Expert"
---

1 change: 1 addition & 0 deletions guides/begin-analysis-with-olap-etl.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ description: "Read about Begin Analysis with OLAP ETL on the RavenDB.net news se
externalUrl: "https://ravendb.net/articles/begin-analysis-with-olap-etl"
publishedAt: 2025-12-22
image: "https://ravendb.net/wp-content/uploads/2025/12/OLAP-article-image.svg"
proficiencyLevel: "Expert"
---

Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ description: "Read about Building a Beer Vending Machine with RavenDB Embedded o
externalUrl: "https://ravendb.net/articles/building-a-beer-vending-machine-program-with-ravendb-embedded-server"
publishedAt: 2025-12-23
image: "https://ravendb.net/wp-content/uploads/2024/11/article-beer-2.jpg"
proficiencyLevel: "Beginner"
---

1 change: 1 addition & 0 deletions guides/connecting-c-application-to-ravendb-cloud.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ description: "Read about Connecting C# application to RavenDB Cloud on the Raven
externalUrl: "https://ravendb.net/articles/connecting-c-application-to-ravendb-cloud"
publishedAt: 2025-02-25
image: "https://ravendb.net/wp-content/uploads/2025/01/connecting-c-application-article-cover.jpg"
proficiencyLevel: "Beginner"
---
1 change: 1 addition & 0 deletions guides/connecting-node-js-application-to-ravendb-cloud.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ description: "Read about Connecting Node.js application to RavenDB Cloud on the
externalUrl: "https://ravendb.net/articles/connecting-node-js-application-to-ravendb-cloud"
publishedAt: 2025-02-25
image: "https://ravendb.net/wp-content/uploads/2025/01/connecting-nodejs-to-ravendb-article-cover.jpg"
proficiencyLevel: "Beginner"
---
1 change: 1 addition & 0 deletions guides/connecting-node-js-web-application-to-ravendb.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ description: "Read about Connecting Node.JS web application to RavenDB on the Ra
externalUrl: "https://ravendb.net/articles/connecting-node-js-web-application-to-ravendb"
publishedAt: 2025-02-25
image: "https://ravendb.net/wp-content/uploads/2024/12/NodeJS-article-cover.jpg"
proficiencyLevel: "Beginner"
---
1 change: 1 addition & 0 deletions guides/deploying-ravendb-with-helm-chart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ description: "Read about Deploying RavenDB with Helm Chart on the RavenDB.net ne
externalUrl: "https://ravendb.net/articles/deploying-ravendb-with-helm-chart"
publishedAt: 2025-11-18
image: "https://ravendb.net/wp-content/uploads/2025/05/helm-chart-article-cover.jpg"
proficiencyLevel: "Expert"
---
1 change: 1 addition & 0 deletions guides/diacritic-sensitive-search-in-ravendb.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ description: "Read about Diacritic-Sensitive Search in RavenDB on the RavenDB.ne
externalUrl: "https://ravendb.net/articles/diacritic-sensitive-search-in-ravendb"
publishedAt: 2025-05-09
image: "https://ravendb.net/wp-content/uploads/2025/05/diacritic-sensitive-article.jpg"
proficiencyLevel: "Expert"
---

1 change: 1 addition & 0 deletions guides/dynamic-fields.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ description: "Read about Dynamic Fields in RavenDB on the RavenDB.net news secti
externalUrl: "https://ravendb.net/articles/dynamic-fields"
publishedAt: 2024-10-28
image: "https://ravendb.net/wp-content/uploads/2024/10/dynamic-fields-cover.jpg"
proficiencyLevel: "Expert"
---

1 change: 1 addition & 0 deletions guides/embeddings-generation-with-ravendb.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ description: "Read about Embeddings Generation with RavenDB on the RavenDB.net n
externalUrl: "https://ravendb.net/articles/embeddings-generation-with-ravendb"
publishedAt: 2025-03-31
image: "https://ravendb.net/wp-content/uploads/2025/03/ai-search-article-cover.jpg"
proficiencyLevel: "Beginner"
---

33 changes: 13 additions & 20 deletions guides/employing-data-archival-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ image: "https://ravendb.net/wp-content/uploads/2025/10/employing-data-archival-a
publishedAt: 2025-11-17
description: "How to set up and use data archival in RavenDB"
author: "Paweł Lachowski"
proficiencyLevel: "Expert"
---

import Admonition from '@theme/Admonition';
Expand All @@ -14,6 +15,7 @@ import TabItem from '@theme/TabItem';
import CodeBlock from '@theme/CodeBlock';
import LanguageSwitcher from "@site/src/components/LanguageSwitcher";
import LanguageContent from "@site/src/components/LanguageContent";
import Image from "@theme/IdealImage";

Let’s say you’re building an invoice processing system. When you first set up your database during development, everything feels great. Routines start storing invoices as documents, and indexes work flawlessly, allowing queries to be processed quickly. The entire system feels smooth and responsive.

Expand All @@ -37,9 +39,8 @@ from index "InvoicesByIssueDate" where issue_date >= "2025-06-25T10:21:56.1500Z"

A query (not so complex) alone took over 1200ms. Exploring the data by the user takes a lot of time, reducing the quality of service and making interacting with your application frustrating.

![](./assets/archival1.png)
![](./assets/archival2.png)

<Image img={require("./assets/archival1.png")} alt="" />
<Image img={require("./assets/archival2.png")} alt="" />
Not mentioning overhead of the rest of the system. Forget about instant filtering \- you’re indexing all of the data, even though your users don’t care about the old stuff.

This creates a huge problem as all those files from seven years ago are still being viewed and filtered during the query.
Expand All @@ -62,8 +63,7 @@ To trigger this feature, you can take one of two approaches: from code or the st

**If you’re using RavenDB Cloud,** make sure to enable Data Archival in the Product Features section before continuing.

![](./assets/archival3.png)

<Image img={require("./assets/archival3.png")} alt="" />
To enable and trigger data archival from your application, we need to define which collection should be archived and set up the archival configuration. That’s how we do that:

```csharp showLineNumbers
Expand Down Expand Up @@ -101,8 +101,7 @@ Or we can trigger it from the studio easily, we just need to:
4. Optionally, toggle to customize the maximum number of documents the archiving task will process in a single run.
5. Click Save to apply your settings.

![](./assets/archival4.png)

<Image img={require("./assets/archival4.png")} alt="" />
But this is only the beginning. We have only triggered our archival, but now we need to tell RavenDB which files we want to archive.

## Sorting Through the Piles: Choosing What to Archive
Expand All @@ -125,8 +124,7 @@ update {

This code calculates our gap 90 days from the `issue_date` of each file. Then it converts it to an ISO string, allowing us to use and archive it using this calculated value. RavenDB will process all documents in the Invoices collection.

![](./assets/archival5.png)

<Image img={require("./assets/archival5.png")} alt="" />
Alternatively, we can do it with patchByQuery from code:

```csharp showLineNumbers
Expand Down Expand Up @@ -181,16 +179,13 @@ using (var session = store.OpenSession())

How does archival affect this problem? After setting up the archival, documents only 90 days old or newer will be made available by default for all indexes. Because indexes are interconnected with other parts of the system, this affects your whole system. After archiving our files, changes are made to the metadata.

![](./assets/archival6.png)

<Image img={require("./assets/archival6.png")} alt="" />
And the index becomes smaller, containing fewer files.

![](./assets/archival7.png)

<Image img={require("./assets/archival7.png")} alt="" />
This will affect queries by reducing the time they need to search through data. After all, a big part of the documents isn’t in the indexes.

![](./assets/archival8.png)

<Image img={require("./assets/archival8.png")} alt="" />
Query performance improved, but the data is still in the database. Perfect of two worlds.

## Archive behaviour
Expand All @@ -201,12 +196,10 @@ When you have archival enabled during index creation, you can choose the behavio

In indexes, you do that at the bottom of the index in the configuration.

![](./assets/archival9.png)

<Image img={require("./assets/archival9.png")} alt="" />
Or if you are using subscriptions, you can change this setting directly under subscription RQL.

![](./assets/archival10.png)

<Image img={require("./assets/archival10.png")} alt="" />
More information about behaviour can be found in our documentation under this [link](https://docs.ravendb.net/7.1/data-archival/archived-documents-and-other-features).

## Taking documents out
Expand Down Expand Up @@ -242,6 +235,6 @@ Note: Don’t try to just remove `@archived: true` manually in the document. Thi

## Summary

Data archival gives you more control over your database. By excluding unnecessary documents from queries, it makes them run smoother. But there’s so much more to RavenDB, like GenAI support, which you can read about [here](https://ravendb.net/articles/survive-the-ai-tidal-wave-with-ravendb-genai) and so many other features.
Data archival gives you more control over your database. By excluding unnecessary documents from queries, it makes them run smoother. If you’re also looking to reduce storage costs for binary data, check out our guide on [using remote attachments to cut storage costs](https://docs.ravendb.net/guides/using-remote-attachments-to-cut-storage-costs). But there’s so much more to RavenDB, like GenAI support, which you can read about [here](https://ravendb.net/articles/survive-the-ai-tidal-wave-with-ravendb-genai) and so many other features.

Interested in testing this feature before taking a production licence? Grab the developer license dedicated to testing under this link [here](https://ravendb.net/dev). Any questions about this feature or just want to hang out and talk with the RavenDB team? Join our Discord Community Server \- invitation link is [here](https://discord.com/invite/ravendb).
28 changes: 11 additions & 17 deletions guides/employing-schema-validation-to-standardize-your-data.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ icon: "document-schema"
description: "Learn more about configuring schema validation in RavenDB to incrase trust in your data across teams."
publishedAt: 2026-02-01
author: "Paweł Lachowski"
proficiencyLevel: "Expert"
---

import Admonition from '@theme/Admonition';
Expand All @@ -13,6 +14,7 @@ import TabItem from '@theme/TabItem';
import CodeBlock from '@theme/CodeBlock';
import LanguageSwitcher from "@site/src/components/LanguageSwitcher";
import LanguageContent from "@site/src/components/LanguageContent";
import Image from "@theme/IdealImage";

When working with any type of data, things usually go smoothly when a single team owns the entire system. When an organisation adds new teams that work on the same data, it can quickly become a mess without proper governance. You may find yourself being frustrated that the other team is saving as a string what breaks your system from time to time. Data must be tracked, and dataset version changes must be enforced precisely. You need to keep the same data model between all documents. Thankfully, we now have a tool to handle those situation and you don’t need to prepare for the worst by preparing boundaries. This tool is a schema validation.

Expand Down Expand Up @@ -56,21 +58,18 @@ About the modes we mentioned, we can divide the audit operation into two modes.
If the schema is triggered, it will block the document from being stored and return an error.

If you want to input only a few documents or use schema validation as a one-time scan, you can disable schema validation while leaving global schema validation enabled. You can also trigger a collection-wide scan to test all documents, not just new ones. We will use a basic schema to scan if all our Orders have the Company and Employee fields. Click on the testing button and then on the bottom-right corner, press run test. It will return all errors in the table.
![](./assets/Validation1.png)
![](./assets/Validation2.png)

<Image img={require("./assets/Validation1.png")} alt="" />
<Image img={require("./assets/Validation2.png")} alt="" />
As you can see, one of our orders is missing the Employee field.

### Index

Once your schema is ready, we can also create an index to store all documents that do not fit the schema in one place. With index, prepared you can just query your documents:

![](./assets/Validation3.png)

<Image img={require("./assets/Validation3.png")} alt="" />
And after clicking eye icon in preview you can learn more information about this document.

![](./assets/Validation4.png)

<Image img={require("./assets/Validation4.png")} alt="" />
## How to use it with code?

### Audit Operation
Expand Down Expand Up @@ -101,8 +100,7 @@ foreach (var error in result.Errors)
```

After that, we get a response like this.
![](./assets/Validation5.png)

<Image img={require("./assets/Validation5.png")} alt="" />
### Index

Of course, querying from code is an option too; you just need to prepare the required index beforehand. To query such an index, you can usea script like this one:
Expand Down Expand Up @@ -141,8 +139,7 @@ How do you create such index? Can we make it from code? Let’s get into configu

To configure schema validation in Studio, first enter the database you want to set it for, then navigate to Settings \> Document Schema. Add a new schema. This gives us two fields. One to select the collection and another to write our schema in.

![](./assets/Validation6.png)

<Image img={require("./assets/Validation6.png")} alt="" />
After you selected collection, you can proceed to write your schema. Schemas are built using [JSON Schema](https://json-schema.org/), a popular vocabulary for JSON files. Basic schema on orders collection can look like this:

```json
Expand Down Expand Up @@ -257,8 +254,7 @@ select new

We need to add Errors to stored values. We can easily do that in the fields section.

![](./assets/Validation7.png)

<Image img={require("./assets/Validation7.png")} alt="" />
If you want to make this index to only gather errors from one collection, change the first line to:

```
Expand All @@ -267,16 +263,14 @@ from doc in docs.ChosenCollection //change ChosenCollection to your collection

We can save the index, and if we have any documents not matching the schema in database, we can notice they are added to the index.

![](./assets/Validation8.png)

<Image img={require("./assets/Validation8.png")} alt="" />
### Dedicated index schema

Because our schema is enabled, writes will be blocked. But we can create an index that does not require enabling the schema. We switch to a different section on the same bar where we were selecting Fields to add the Errors field, and switch to Schema Definitions. There, we can write a definition dedicated to this index.

In there, we select our desired collection and input our schema.

![](./assets/Validation9.png)

<Image img={require("./assets/Validation9.png")} alt="" />
After saving it if you didn’t do it before, you can delete or disable the schema in the **database** setting. Now let’s do this from code.

## Configure it from code
Expand Down
1 change: 1 addition & 0 deletions guides/enable-ai-search-in-your-web-app-in-5-minutes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ description: "Read about Enable AI Search in Your Web App in 5 Minutes on the Ra
externalUrl: "https://ravendb.net/articles/enable-ai-search-in-your-web-app-in-5-minutes"
publishedAt: 2025-04-28
image: "https://ravendb.net/wp-content/uploads/2025/04/enable-ai-search-cover.jpg"
proficiencyLevel: "Beginner"
---

1 change: 1 addition & 0 deletions guides/feed-elasticsearch-from-your-ravendb.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ description: "Read about Feed Elasticsearch from Your RavenDB on the RavenDB.net
externalUrl: "https://ravendb.net/articles/feed-elasticsearch-from-your-ravendb"
publishedAt: 2025-12-14
image: "https://ravendb.net/wp-content/uploads/2025/12/elastic-search-article-image.png"
proficiencyLevel: "Expert"
---

Loading
Loading