Guides

Indexing Your Project

How and when to index your codebase

Indexing creates a searchable database of your code, enabling fast semantic search and dependency analysis.

What Indexing Does

When you index a project, Stellarion:

  1. Scans files — Finds all source code files
  2. Creates embeddings — Generates vector representations of code
  3. Builds a graph — Maps dependencies between files
  4. Stores data — Saves everything for fast retrieval

When to Index

First Time Setup

Index your project when you first start using Stellarion:

Index this project for semantic search

After Major Changes

Re-index after:

  • Adding significant new code
  • Major refactoring
  • Merging large branches
  • Switching to a branch with different code

Periodic Refresh

For active projects, consider re-indexing weekly to keep search results current.

How to Index

Basic Indexing

Index this project

Force Re-index

If you want to rebuild from scratch:

Re-index this project, force a full rebuild

With Statistics

To see what was indexed:

Index this project and show me the statistics

What Gets Indexed

Included

  • Source code files (ts, js, py, rs, go, java, c, cpp, rb)
  • Documentation comments
  • Function and class definitions
  • Type definitions and interfaces

Excluded

  • node_modules/
  • dist/, build/, target/
  • .git/
  • Binary files
  • Files in .gitignore

Storage

Index data is stored in your project:

.stellarion/
├── vector_store/     # Semantic embeddings (RocksDB)
└── graph_kuzu/       # Dependency graph (KuzuDB)

Storage Size

  • Small projects (< 100 files): ~10-50 MB
  • Medium projects (100-500 files): ~50-200 MB
  • Large projects (500+ files): ~200+ MB

Large Codebases

For very large projects:

Limit File Count

Index this project with a maximum of 500 files

Index Specific Directories

Index only the src/ directory

Incremental Updates

Stellarion tracks what's already indexed and can update incrementally.

Troubleshooting

Indexing is Slow

  • Large codebases take time (expect minutes, not seconds)
  • Ensure you have sufficient disk space
  • Close other resource-intensive applications

Search Not Finding Code

  • Check if the project is indexed: stellarion status
  • Re-index if code has changed significantly
  • Verify the file type is supported

Out of Memory

For very large projects:

  • Limit the number of files
  • Index specific directories instead of the whole project
  • Ensure sufficient system memory

Best Practices

  1. Index once, search many times — Initial index is slow, but searches are fast
  2. Re-index after major changes — Keep embeddings current
  3. Use .gitignore — It's respected during indexing
  4. Monitor storage — Delete .stellarion/ if you need to reclaim space