Guide · 6 min read
Code search
Find symbols and text across your project — full-text, semantic, and hybrid search with real-time indexing.
- Product stage
- Pre-release development
- Last reviewed
- 2026-07-23
- Successful result
- The change is visible in the active project.
What this accomplishes
Find symbols and text across your project — full-text, semantic, and hybrid search with real-time indexing.
Miton searches your codebase as you work. Full-text search indexes on every file change; optional semantic search finds related code by meaning; hybrid mode combines both.
In the app you use Find in project, symbol search, inline editor search, and the symbol outline.
Current availability
This page documents behaviour verified in Miton development builds. Miton is still pre-release and is not publicly downloadable; invited beta users will receive a signed desktop build with automatic updates.
Before you start
- A Miton development build and an active project containing source code.
- A connected model. Trust the project before allowing file, terminal or Git actions.
Full-text search
The full-text search is BM25 via Tantivy. Tantivy is a Rust full-text search engine that indexes the
user’s project on every file change. The index is a per-project Tantivy index; the index is stored
in the project’s .miton/argus/ directory.
The full-text search supports:
- Plain text search — the simplest mode. The query is a string; the search returns the files that contain the string.
- Phrase search — wrap the query in double quotes. The search returns the files that contain the phrase.
- Boolean operators —
AND,OR,NOT. The search returns the files that match the boolean expression. - Field-specific search —
path:src/,ext:ts,func:doFoo. The search returns the files that match the field-specific query. - Regex search — wrap the query in forward slashes (
/regex/). The search returns the files that match the regex.
The full-text search results are ranked by BM25. The ranking is the standard BM25 ranking; the relevance score is a function of the term frequency, the document frequency, and the document length.
The vector search
The vector search is via sqlite-vec. The vector search is enabled when the user configures an embedding model in Settings under “Code search → Embedding model”. The default is no embedding model (the vector search is opt-in to avoid downloading a multi-gigabyte model on first run).
The supported embedding models are:
- Local sentence-transformers — the user downloads a sentence-transformers model (e.g.
all-MiniLM-L6-v2) and Miton runs the model on the user’s hardware. The model is stored in the project’s.miton/argus/directory. - Local Ollama embeddings — the user configures an Ollama deployment with an embedding model
(e.g.
nomic-embed-text) and Miton calls the Ollama API for the embeddings. - BYOK embedding provider — the user configures an embedding provider (e.g. OpenAI embeddings) via a BYOK API key. Miton calls the provider’s API for the embeddings.
The vector search supports:
- Semantic search — the query is a natural- language question. The search returns the files that are semantically related to the question.
- Hybrid mode — combines the BM25 ranking and the vector ranking with Reciprocal Rank Fusion. The default; the user can disable hybrid mode in Settings.
The vector search is real-time; the index updates as files change. The index update is debounced (250ms by default) to avoid hammering the embedding model on a burst of changes.
The hybrid mode
Hybrid mode blends full-text and meaning-based results so you get both exact symbol hits and related code. Prefer hybrid unless you know you only want one kind of match. The blend is adjustable in Settings under “Code search → Mode” (default: hybrid).
The real-time indexing
The code search index is real-time. The index updates as files change; the user does not have to manually re-index the project. The index update is debounced (250ms by default) to avoid hammering the embedding model on a burst of changes.
The index update respects the user’s .gitignore file by default. The user can configure additional
ignore patterns in Settings under “Code search → Ignore patterns”. The ignore patterns are standard
gitignore syntax.
The index update respects the user’s .miton/argus-ignore file. The file is in the project root;
the file is a list of patterns to ignore from the index. The user can use the file to exclude
generated files, vendored dependencies, and other content that should not be in the search index.
The user-facing surfaces
The code search has five user-facing surfaces:
- The find and replace across the project (
Cmd+Shift+F). The user sees a CoW panel with a search input, a list of matches, and a preview of each match. The user can navigate the matches withEnterandShift+Enter; the user can replace the matches with the replace button. - The symbol search (
Cmd+Shift+O). The user sees a CoW panel with a search input and a list of symbols. The user can click a symbol to jump to the symbol’s location. - The in-editor inline search. The user presses
Cmd+Fin the editor; the editor shows a search input at the top of the editor. The user can search the current file; the user can pressCmd+Shift+Fto search the project. - The symbol outline. The symbol outline shows the symbols in the current file. The user can click a symbol to jump to it.
- The chat search. The agent can call the code search as a tool; the user can ask “where is the user authentication code?” and the agent returns the search results.
The configuration
The code search is configurable in Settings under “Code search”:
- Mode — full-text, vector, or hybrid (default).
- Embedding model — none, local models, or a BYOK provider.
- Ranking blend — how strongly full-text vs vector results count (defaults favour balance).
- Index update delay — how quickly the index refreshes after file changes.
- Ignore patterns — additional ignore patterns on top of
.gitignore.
The configuration is per workspace; the user can set defaults globally in Settings, or per project
in .miton/settings.json.
What code search does not cover
Code search does not cover:
- Code generation — the user can ask the agent to write code based on a search query; the agent uses the code search as a tool but the agent generates the code in a separate step.
- Code review — use transparency and approvals to see tool calls, including code search, and to review the agent’s changes.
- Cross-project search — the code search is per project. The user can configure a global search across all projects in Settings under “Code search → Global search”.
What success looks like
The code search is a hybrid of full-text and vector search. The full-text search is BM25 via Tantivy; the vector search is via sqlite-vec; the hybrid mode combines the two with RRF.
The vector search is opt-in. The user has to configure an embedding model to enable the vector search. The default is full-text only.
The index is real-time. The user does not have to manually re-index the project. The index updates as files change; the update is debounced to avoid hammering the embedding model.
The user-facing surfaces are the find and replace across the project, the symbol search, the in-editor inline search, the symbol outline, and the chat search. The user can use any of these surfaces to find code.
Common failures and recovery
- Confirm the correct project and branch are active.
- Check the model connection and the permission request shown in Chat.
- Keep the exact error before retrying; use Code troubleshooting when the failure persists.
Related next action
Open Code troubleshooting for recovery steps and diagnostic paths.