---
title: Indexer
description: Splitting text into chunks and embedding them into a vector store
---

Save text from a workflow into a knowledge base, so agents can search it later.

## What it does

Indexer splits **Input** into chunks with the connected text splitter, then saves the chunks into the knowledge base connected to **Knowledge**. Each chunk is embedded with that knowledge base's own embedding model.

With a [Local Knowledge](/nodes/builtin/ai/aidependencies/vectorstore/localknowledge/) store, indexing the **same source** again updates it instead of adding a copy: its chunks are overwritten, and if the new text is shorter, the extra old chunks are removed. Empty chunks are skipped.

Indexer is an end point: it has no output port, so nothing runs after it on its branch.

## When to use it

* Fill a [knowledge base](/app/knowledge-bases/overview/) from a workflow: pages you scrape, files you load, results of an API call.
* Keep a knowledge base up to date on a schedule, by re-indexing the same pages.

To add files, pages or text by hand, use **Add sources** on the knowledge bases page instead. To ask questions about indexed content, use [RAG Agent](/nodes/builtin/ai/aiagents/ragnode/) or [Q\&A Agent](/nodes/builtin/ai/aiagents/qanode/).

## Inputs and settings

Fill **Input** with an expression such as `{{ $input.text }}`.

A source is identified by its **Source ID**, else its **Source link**, else its **Source name**. With none of them, the text itself is the identity, so a changed text counts as a new source. When a workflow re-indexes the same pages, always set one of the three. Citations show **Source name**, or the link, or "Workflow input" when both are empty.

## Outputs

This node has no output port: nothing runs after it on this branch.

Each output item has these fields:

```json title="Shape of an output item"
{
  "success": true,
  "chunks": 0,
  "added": 0,
  "updated": 0,
  "failed": 0,
  "removed": 0,
  "sourceId": "…"
}
```

The result is visible in the run data:

* `chunks`: how many chunks the input was split into.
* `added` and `updated`: new chunks, and chunks that replaced the same source's previous version.
* `failed`: chunks that could not be saved. `success` is `false` when any failed.
* `removed`: old chunks deleted because the source got shorter.
* `sourceId`: the source the chunks are stored under. Index again with the same id to update it.

After a run, the node on the canvas shows a badge such as **24 added · 3 updated**. With a vector store other than Local Knowledge, chunks are simply added and `updated` is always 0.

## Dependencies and credentials

* **Knowledge**: a [Local Knowledge](/nodes/builtin/ai/aidependencies/vectorstore/localknowledge/) node pointing at the knowledge base to fill.
* **Text Splitter**: how the text is cut, for example [Recursive Character Text Splitter](/nodes/builtin/ai/aidependencies/textsplitter/recursivecharactertextsplitter/).
* **Model**: not used for indexing. Workflows that already have one connected keep working.

## Example workflow

1. [Schedule](/nodes/builtin/trigger/schedule/) runs every day.
2. [Get All Text from Link](/nodes/builtin/core/getalltextfromlink/) with **URL** `https://example.com/pricing` and **Output field name** `text`.
3. Indexer with **Input** `{{ $input.text }}`, **Source name** `Pricing page` and **Source link** `https://example.com/pricing`. Connect [Local Knowledge](/nodes/builtin/ai/aidependencies/vectorstore/localknowledge/) to **Knowledge** and [Recursive Character Text Splitter](/nodes/builtin/ai/aidependencies/textsplitter/recursivecharactertextsplitter/) to **Text Splitter**.

Each day the same source is updated in place, and chat citations link back to the page.

## Common issues

* **"None of the N chunks could be saved to the knowledge base."** Nothing was written. Check that the knowledge base exists and that its embedding model is installed in [Local models](/app/local-models/).
* **"N of M chunks could not be saved to the knowledge base."** (a warning in the run log) Part of the text was saved; `success` is `false` and `failed` counts the rest. Run again to retry.
* **Duplicates appear after each run.** No stable identity is set. Fill **Source ID**, **Source link** or **Source name**.
* **Citations read "Workflow input".** Set **Source name**.
* **"Vector store not found" or "Text splitter not found".** The node on that slot is not set up. Open it and complete its settings.

## Related nodes

* [Local Knowledge](/nodes/builtin/ai/aidependencies/vectorstore/localknowledge/): the knowledge base Indexer writes to.
* [RAG Agent](/nodes/builtin/ai/aiagents/ragnode/) and [Q\&A Agent](/nodes/builtin/ai/aiagents/qanode/): answer questions from what you indexed.
* [File Document Loader](/nodes/builtin/ai/loaders/filedocumentloader/) and [URL Document Loader](/nodes/builtin/ai/loaders/urldocumentloader/): load documents to index.