# `mix exograph.index`
[🔗](https://github.com/elixir-vibe/exograph/blob/v0.2.0/lib/mix/tasks/exograph.index.ex#L1)

Indexes Elixir source files with Exograph.

    mix exograph.index --repo MyApp.Repo --migrate
    mix exograph.index --repo MyApp.Repo --migrate lib test
    mix exograph.index --repo MyApp.Repo --min-mass 8 --stats lib

## Options

  * `--backend` - only `postgres` is supported (default: `postgres`)
  * `--repo` - Ecto repo module for the Postgres backend
  * `--prefix` - Exograph table prefix for the Postgres backend (default: `exograph`)
  * `--migrate` - create/upgrade Postgres tables and ParadeDB BM25 index
  * `--no-bm25` - skip ParadeDB `pg_search` extension/index creation during migration
  * `--min-mass` - minimum AST fragment mass (default: `8`)
  * `--stats` - print indexed fragment statistics
  * `--json` - print summary as JSON

Postgres is the durable backend. With ParadeDB `pg_search` installed,
`--migrate` creates BM25 covering indexes inside Postgres.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
