Skip to main content
Enterprise only
LanceDB Enterprise separates query planning from index execution and data reads so that search can use the memory, CPU, and caches of multiple machines. A query node plans and coordinates a query. Executors search indexes, read table data, and return partial results for the query node to combine. For the service components and overall request paths, see Architecture.

Search architecture

LanceDB Enterprise prioritizes horizontal scalability. Index execution on a single node can be limited by the memory available to cache the index for fast search and by the CPU available to execute queries. Dividing one logical index into multiple index segments lets each segment be distributed to an executor, cached independently, and searched in parallel with other segments. The two serving components have different responsibilities: Eligible scalar index operations can also execute on executors. See scalar indexes and filtering for index types and query syntax. For example, consider a vector index with six segments served by three executors. Each executor searches its two segments and returns its best 10 candidates. The query node compares the candidates returned by all three executors and selects the final 10. This example assumes enough matching rows and the default search path without additional reranking. When a vector index has a single large segment or a few skewed segments that would otherwise concentrate search work on one executor, eligible IVF queries with enough probed partitions can also fan out partitions of that segment across multiple executors. The segment’s primary executor ranks candidate centroids once, and the query node routes the selected IVF partitions deterministically across the segment’s executor shard pool before merging top-k candidates. Small probe budgets and balanced multi-segment indexes continue to execute directly on each segment’s primary executor without extra coordination.

Tiered index cache

Executors cache index structures in memory, and extend that cache onto local disk when the disk tier is enabled. See Tiered Index Cache for how the two tiers work together and how the disk tier’s budget is shared and sized; ask your deployment operator about enabling it on your cluster.

Create and query an IVF-RQ index

Use the regular table API. These examples assume table is an open Enterprise table with a vector column and the query vector is compatible with that column. For connection setup, see connect to LanceDB. You can create an index before filling a vector column, including an all-NULL Function column on a populated table. The index definition is registered, but training waits until enough non-NULL vectors exist (IVF_PQ also needs enough vectors to train its codebook). Refresh the Function to populate its output; automatic index maintenance then trains the index. Index statistics report num_indexed_rows=0 until rows are indexed. Check this count before relying on index coverage.
Enterprise builds FTS, vector, and scalar indexes in the background. For first-time creation, the index appears in listings only after a worker publishes it. During replacement, the existing index keeps serving with its current settings and coverage until the replacement is published atomically. Track the submitted indexing job’s completion to determine when the replacement is ready; coverage statistics can still describe the serving index while the job runs. These examples explicitly select 5 bits per dimension. See the shared docs for RaBitQ and num_bits, index creation parameters, and vector search. For the fast, normal, and accurate latency/recall modes, see tuning approx_mode. The Rust SDK currently exposes that query setting; the examples above use the default mode. FTS work is organized by inverted index and fragment ownership. Compatible single-column operations execute together on executors over that index’s segments. Eligible compound, cross-column (Boolean and Boost), and hybrid (indexed segments plus unindexed tail fragments) queries also execute directly on executors over disjoint fragment ownership sets:
  1. The query node assigns each fragment to a single executor, preserving index segment placement and data-file page cache affinity.
  2. Each executor task evaluates the query over its assigned segments or owned fragments and returns at most limit top candidates (in global scoring mode, mask-budget chunking can split an executor’s segments into multiple tasks, each returning up to limit candidates).
  3. The query node merges the bounded candidate streams with deterministic (_score DESC, _rowid ASC) ordering and applies the final top-k.
For queries whose subtrees cannot be partitioned across executors (such as unsupported corpus shapes or legacy executor fleets), operations fall back to separate per-index executor searches or native query-node execution.

Local and global scoring

Distributed FTS defaults to local scoring. For indexed and compound searches, each executor uses statistics from its assigned segments—or, when an eligible large or skewed multi-partition segment is split across executors by its physical postings partitions, from that executor’s assigned postings partitions—and its assigned unindexed fragments (for hybrid or partial-index queries) to calculate BM25 scores. This executes in a single search round without a statistics barrier, though document frequencies and average document lengths can differ between executors, so merging their scores can produce a different ranking from scoring with statistics across the entire index. Global scoring adds a statistics round before search so every executor scores with consistent corpus-wide BM25 statistics:
  • For indexed and cross-column searches, the query node gathers document counts, token counts, and query-term document frequencies per column across all committed index segments.
  • For hybrid and partial-index compound searches whose unindexed residual fragments span multiple executors, the statistics round also gathers per-executor residual token statistics in parallel and seeds each executor with the combined committed and peer-residual statistics.
The statistics remain per-column rather than blended across different text columns. Both modes merge bounded per-executor results on the query node; global mode does not rescore returned rows on the query node. When term frequencies and document lengths are similarly distributed across index segments, local scoring can produce rankings comparable to global scoring. If segments contain substantially different document populations, prefer global scoring for consistent statistics across the index, at the cost of an additional statistics round and higher query latency. Eligible flat searches over entirely unindexed text also use this setting. In local mode, the scoring corpus is split by ownership of table data. Each executor computes BM25 statistics over its assigned documents before candidate selection, then returns matching rows. This takes one FTS execution round without a global statistics barrier; the query node applies the final top-k. Changing executor ownership can change scores and ranking even when the table data is unchanged. In global mode, eligible unindexed flat searches and partially indexed (mixed) searches use a two-phase protocol across executors that preserves exact corpus-wide BM25 statistics. In phase 1, each owning executor streams its assigned flat shards (and any participating index segments) to collect document counts, token counts, per-term document frequencies, and bounded sparse match locations; the query node aggregates these into one exact global BM25 scorer. In phase 2, only executors with matching documents and admitted candidates run streaming scoring (and per-executor top-k when applicable) under that shared scorer before the query node merges the final top-k. When a pure flat search maps to a single executor with no separate indexed seed or non-separable candidates, it keeps a single-pass single-executor fast path without a separate statistics round. Inputs that cannot be safely partitioned retain their complete scoring domain on a single executor, and if executor capabilities (such as rolling upgrades with older executors) or routing are unavailable, execution falls back cleanly to a single executor or the query node. Global scoring is a query node setting, configured at the deployment level. See full-text search for query syntax and FTS indexes for index configuration. A table can be larger than any single node’s local storage. Enterprise keeps the durable table in object storage and distributes data reads and caches across executors. An executor needs capacity for its cached working set rather than a complete local copy of the table. With fragment-based data routing, reads for a data fragment go to a serving executor. Different fragments can be served and cached on different executors. The following example shows six fragments served by three executors:

NVMe data caching

The data page cache stores pages read from table fragments on local disk, including NVMe SSDs. On a cache hit, the executor reads the page from local disk; on a miss, it fetches the page from object storage and fills the cache for subsequent reads. The cache holds accessed pages, not necessarily every byte of each fragment assigned to an executor. See Data Page Cache for how it’s structured and sized.

Inspect execution

Use analyze_plan() (analyzePlan() in TypeScript) to understand how a query executes and troubleshoot slow searches. It runs the query and returns the execution plan with runtime metrics. Using the same table and query vector as above:
Inspect the plan to check which indexes are used, which operations run on query nodes or executors, and where execution time is spent. Compare index search with data retrieval to identify expensive work. Repeating the query can also help distinguish cold-cache reads from warm-cache performance.