<!-- generated by build_articles.py — edit content/compare/xerj-vs-obsidian-omnisearch.md instead -->
---
title: "Obsidian search for AI agents 2026: Omnisearch vs XERJ"
canonical: "https://xerj.org/compare/xerj-vs-obsidian-omnisearch"
updated: "2026-11-16"
source: "content/compare/xerj-vs-obsidian-omnisearch.md"
---

# How do I let an AI agent search my Obsidian vault?

**Short answer** (updated 2026-11-16): To let an AI agent search an Obsidian vault, index the vault folder with XERJ and add it as an MCP server; the agent can then search notes and attachments with Obsidian open or closed. Inside Obsidian, Omnisearch is the pick: instant results, BM25 ranking, and PDFs and images through Text Extractor. Many people run both.

**Key number:** Omnisearch has 2,169 GitHub stars, is GPL-3.0, and released 1.31.0 on 2026-09-05. (as of 2026-10-19; source: [github.com/scambier/obsidian-omnisearch](https://github.com/scambier/obsidian-omnisearch))

**TL;DR** Omnisearch is the best way to search inside Obsidian, with instant results, BM25 ranking, and PDFs and images through the Text Extractor plugin. XERJ is for the other reader of your vault: an AI agent. It indexes the vault folder and answers Claude or any MCP client, with Obsidian open or closed. Many people run both.

## Agent prompt

```text
Act as a coding agent whose user has closed Obsidian. Read https://xerj.org/llms.txt, start a node outside the vault with `xerj --insecure --data-dir ./xerj-data`, run `xerj autoindex ./MyVault --prefix vault --state-dir ./state-vault`, then POST a match_phrase on body for a phrase that exists only inside a PDF or DOCX attachment and report the ax_path of every hit without opening Obsidian.
```

## Commands

### Command 1

Note: Start one node outside the vault folder, so the node never indexes its own storage.

```sh
xerj --insecure --data-dir ./xerj-data
```

### Command 2

Note: Markdown notes and the PDF or DOCX attachments beside them land in one index.

```sh
xerj autoindex ./MyVault --prefix vault --state-dir ./state-vault
```

### Command 3

Note: A phrase that lives only in an attachment, returned with the file path.

```sh
curl -s -XPOST 'http://127.0.0.1:9200/vault-*/_search' -H 'content-type: application/json' -d '{"query":{"match_phrase":{"body":"retention policy"}},"_source":["ax_path"]}'
```

## Which vault search fits you?

*Figure: Runs in your browser and sends nothing. Each answer adds a point to the option it matches. A rule of thumb, not a benchmark.*

## Omnisearch: the pick inside the editor

Omnisearch lives inside Obsidian, and its stated first goal is to locate files instantly. It ranks with BM25 through the MiniSearch library, tolerates a typo, and behaves like a quick switcher with a memory.

It also reaches formats that XERJ cannot. With the Text Extractor plugin installed, Omnisearch indexes PDFs, images and some Office documents. XERJ reads text layers and does no optical character recognition, so photographed pages are a job for Omnisearch.

For a person searching notes in Obsidian, Omnisearch is the better tool.

## A note from the Omnisearch docs

Its own documentation is careful about the extraction path. It states that extracting text from those files is not guaranteed, and that at the time of writing many PDFs do not work with Text Extractor.

A vault with many PDF attachments is worth a quick test on both sides.

## XERJ: the pick for agents

Omnisearch is a plugin, so it runs when Obsidian runs. Its HTTP server is opt-in, listens on localhost only, is unavailable on mobile, and stops automatically when Obsidian closes.

That is a sensible design for an editor plugin. An agent on a headless machine, a scheduled job or a second application needs a search that runs on its own.

XERJ starts from the folder instead of the editor:

```sh
xerj autoindex ./MyVault --prefix vault --state-dir ./state-vault
```

Markdown notes and the attachments beside them land in one index. The node answers over the Elasticsearch REST API whether Obsidian is open, closed or uninstalled.

## Two ways to give an agent vault search

The Omnisearch README points at a third-party MCP server that detects Omnisearch and exposes it as a BM25-ranked search mode for agents reading a vault. That path exists and it works.

The difference is what it depends on. That route needs Obsidian running and the local HTTP server enabled.

`xerj mcp` is a stdio MCP server in the same binary as the engine. It serves 24 tools, and it needs no editor at all.

## What XERJ reads in a vault, and how

Thirteen families are covered. For a vault the ones that matter are plain text and markdown, PDF, DOCX, HTML, CSV and JSON.

Ranking is BM25, and a vector clause can be fused into the same query with Reciprocal Rank Fusion or a weighted linear sum. The default embedder is lexical feature hashing, not neural, so the fused vector side carries no meaning-based signal until `--embed-mode neural` is turned on.

One operational note. Put the node's data directory outside the vault you index, or the node will index its own storage.

## What to know before you run XERJ

XERJ runs as one node on one machine, which suits a personal vault well.

Memory use grows with the number of documents indexed, so keep an eye on it for a very large vault with thousands of attachments.

XERJ has no Obsidian plugin or panel. It answers agents and programs, and Omnisearch serves you in the editor.

## When to choose Omnisearch instead

Choose Omnisearch when you are the one searching, inside Obsidian. That is its job and it is good at it.

Choose Omnisearch when your attachments include images or page photographs. Text Extractor reaches them.

Choose Omnisearch when you want zero extra processes on the machine. A plugin costs less than an engine.

## When to choose XERJ instead

Choose XERJ when an agent must read the vault with Obsidian closed. A machine with no editor installed is the same case.

Choose XERJ when the folder holds data files rather than notes. A CSV export or a SQLite database is the usual case.

Choose XERJ when you want the answer as a cited passage over an API an agent already speaks.

## How this page was checked

This is a feature comparison from each project's own documentation, not a benchmark, so there are no timing or recall figures here.

Every Omnisearch fact above comes from its own README and published documentation. Read those before you decide.

## Try it with your agent

Use the Copy the prompt button and paste the prompt into Claude Code or another coding agent. It starts a local XERJ node, indexes your vault folder and finds a phrase that lives only inside an attachment. XERJ is a new way for AI to search for data, and your vault is a good first folder.

## FAQ

### Does XERJ replace Omnisearch inside Obsidian?

No. For a person searching in Obsidian, Omnisearch is the better tool and XERJ has no plugin at all.

### Omnisearch vs an external index for Claude?

Omnisearch runs inside the editor. An external index reads the vault folder while Obsidian is closed, and answers an agent over an API that does not depend on the editor running.

### Can an agent search my Obsidian vault including PDFs?

Yes, where the PDF has a text layer: XERJ indexes vault attachments beside the notes. A PDF that is only page images needs Omnisearch and its Text Extractor plugin, because XERJ does no optical character recognition.

### Can an agent already call Omnisearch?

Yes. Omnisearch has an opt-in local HTTP server, and its README points at a third-party MCP server built on it. Obsidian must be running.

### Is there a measured comparison on this page?

No. No head-to-head was run. Every Omnisearch fact here comes from its own README and documentation.

### How does each one rank?

Omnisearch scores with BM25 through MiniSearch. XERJ ranks with BM25 and can fuse a vector clause with Reciprocal Rank Fusion in the same query.

### What license is Omnisearch under?

Omnisearch is GPL-3, so a derived work you distribute has to carry the same license. XERJ is Apache-2.0, which is permissive.

### Can I run both?

Yes, and that is the usual answer. Omnisearch serves you inside the editor, and XERJ serves the agent outside it.

## Evidence

- Omnisearch is a search plugin inside Obsidian whose stated first goal is to locate files instantly, and it scores documents with the BM25 algorithm through the MiniSearch library. Source: [https://github.com/scambier/obsidian-omnisearch](https://github.com/scambier/obsidian-omnisearch)
- Omnisearch indexes PDFs, images and some Microsoft Office documents with the help of the Text Extractor plugin, and its own documentation warns that extraction is not guaranteed and that many PDFs do not work with Text Extractor. Source: [https://publish.obsidian.md/omnisearch/Images,+PDFs,+and+non-text+documents](https://publish.obsidian.md/omnisearch/Images,+PDFs,+and+non-text+documents)
- The Omnisearch HTTP server must be activated in settings, is not accessible outside localhost, is unavailable on mobile, and stops automatically when Obsidian closes. Source: [https://publish.obsidian.md/omnisearch/Public+API+%26+URL+Scheme](https://publish.obsidian.md/omnisearch/Public+API+%26+URL+Scheme)
- The Omnisearch README points at a third-party MCP server that detects Omnisearch and exposes it as a BM25-ranked search mode for agents reading a vault. Source: [https://github.com/scambier/obsidian-omnisearch](https://github.com/scambier/obsidian-omnisearch)
- Omnisearch is licensed under GPL-3. Source: [https://github.com/scambier/obsidian-omnisearch](https://github.com/scambier/obsidian-omnisearch)

## Related

- [What's the best way to search markdown notes and PDFs in the same vault?](/answers/search-obsidian-pdf-docx-attachments)
- [Local file search MCP server: let Claude or ChatGPT search a folder on your laptop](/answers/give-chatgpt-claude-local-file-access)
- [How do I search through a folder of contracts in .docx?](/answers/search-word-documents-in-a-folder)
- [I have a folder of PDFs, Word docs, and markdown. How do I search all of them at once?](/answers/search-file-contents-in-a-folder)
- [How do I index Markdown into the Elasticsearch API?](/answers/index-markdown-into-elasticsearch-api) (same intent: logs and docs)
- [Why does my Notion export duplicate titles?](/answers/notion-export-duplicate-search-results) (same intent: logs and docs)
- [A free DocFetcher alternative your AI agent can call](/compare/xerj-vs-docfetcher) (same intent: logs and docs)
