> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lancedb.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Distributed Indexing

> How LanceDB Enterprise distributes a vector index build across a fleet of workers, stage by stage.

**Applies to:** Embedded ❌, Enterprise ✅

A vector index build splits into stages, and the data in scope narrows at
each one: training works from a small sample, shuffling touches every row
once, and merging works entirely within one partition at a time. Full-text
and scalar index builds skip training and shuffling -- they bin-pack
directly into independent tasks workers claim and build in parallel,
closer to how [distributed compaction](https://docs.lancedb.com/enterprise/distributed-compaction.md)
splits work. See [Architecture](https://docs.lancedb.com/index.md#architecture).

## Stages of a vector index build

1. **Train.** A sample of the table's vectors -- not the full dataset --
   trains the shared model every worker will use: IVF partition centroids,
   and for IVF-PQ, a PQ codebook on top of them.
2. **Shuffle.** Every row in the table gets assigned to its nearest
   trained partition and regrouped so that all of one partition's rows end
   up together, wherever in the table they originally lived.
3. **Merge.** Each partition is now self-contained, so workers build and
   merge partitions in parallel with no cross-partition coordination --
   one worker's output never depends on another's.
4. **Commit.** The finished index is committed to the table.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"catppuccin-mocha"}}
%%{init: {"theme": "base", "themeVariables": {
  "background": "#ffffff", "primaryColor": "#ffffff", "primaryTextColor": "#221d19",
  "primaryBorderColor": "#ad9e95", "lineColor": "#6b625c", "textColor": "#221d19",
  "edgeLabelBackground": "#ffffff", "fontFamily": "Inter, sans-serif", "fontSize": "18px"
}}}%%
flowchart LR
    S["Sample"] --> T["Train IVF centroids<br/>+ PQ codebook"]
    T --> Sh["Shuffle: assign every row<br/>to its nearest partition"]
    Sh --> M1["Merge<br/>partition A"]
    Sh --> M2["Merge<br/>partition B"]
    Sh --> M3["Merge<br/>partition C"]
    M1 --> C["Commit the<br/>finished index"]
    M2 --> C
    M3 --> C
    classDef default fill:#ffffff,stroke:#ad9e95,stroke-width:1px,color:#221d19
    classDef accent fill:#fff1ec,stroke:#e8582d,stroke-width:1.5px,color:#221d19
    class Sh accent
```

## Indexing interfaces

The shared indexing guides describe how to build and maintain each index
type:

* [Vector indexes](https://docs.lancedb.com/indexing/vector-index.md) and [vector search](https://docs.lancedb.com/search/vector-search.md).
* [Full-text indexes](https://docs.lancedb.com/indexing/fts-index.md) and [full-text search](https://docs.lancedb.com/search/full-text-search.md).
* [Scalar indexes](https://docs.lancedb.com/indexing/scalar-index.md) and [filtering](https://docs.lancedb.com/search/filtering.md).
* [Incremental Indexing](https://docs.lancedb.com/indexing/incremental-indexing.md) for triggering and tracking a build.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.