Skip to main content

Global Index

Global indexes map predicates or search requests to row IDs, which Paimon uses to read matching table rows. Choose scalar indexes for filtering, vector indexes for similarity search, and full-text indexes for scored text retrieval. Hybrid search combines scored routes; it is a query API rather than another stored index type.

This guide covers Data Evolution append tables. Primary-key tables have a separate index configuration and lifecycle.

Choose an Index​

Index TypeBest ForNotes
BTreeScalar filters on numeric, string, date, and timestamp columnsBest when predicates are selective, such as equality, IN, range, and null checks.
BitmapEnum-like dimensions and tag columnsBest for equality, IN, string prefix match, complement predicates, and null checks over compressed row-id bitmaps.
MultivalueMembership tests on arrays of supported scalar elementsBest for ARRAY_CONTAINS, ARRAYS_OVERLAP, and ARRAY_CONTAINS_ALL.
FMExact substring filters on character columnsSupports needles of any byte length and partitions the indexed text for bounded-memory construction and demand-loaded reads.
R-treeJava XY bounding-box filters on GEOMETRY columnsUses immutable, paged spatial trees; exact geometry relations require refinement.
VectorTop-K similarity search on embeddingsUses ANN algorithms. Tune build-time and search-time options to balance recall, latency, and index size.
Full-TextKeyword search over text columnsUses full-text scoring and tokenizer configuration stored with each index file.
Hybrid SearchCombining multiple vector routes, multiple full-text routes, or vector and full-text retrieval togetherRuns multiple scored routes and merges them with a ranker before reading rows.
Index coverage affects results

Ordinary Data Evolution batch scans use full by default and read uncovered rows. Vector and full-text searches default to fast and can omit matches outside index coverage. Creating a table or appending data does not build a global index. See Coverage and Freshness.

Prerequisites​

Start with a configured Paimon catalog. Data Evolution requires an append table with row tracking enabled. The following examples assume the db database exists and that SQL uses that database. Load data before building indexes.

global-index.enabled defaults to true; setting it does not create index files.

Index declarations and field options use the same configuration names as primary-key indexes:

global-index.btree.index-columns=category
global-index.ivf-pq.index-columns=embedding
ivf-pq.dimension=768
fields.embedding.index-options={"nlist":64,"distance.metric":"cosine"}

For raw vector searches without existing index files, declare the implementation with global-index.<type>.index-columns (or singular index-column). The former index_type, index-type, vector.index-type, and fields.<column>.index-type table/query option aliases are no longer interpreted. Legacy primary-key index configuration remains supported, including fields.<column>.pk-vector.index.type.

Use the actual implementation identifier, such as ivf-pq, in the declaration. Each listed column declares an independent index. The singular index-column spelling remains an alias; index-columns takes precedence. Field JSON options override implementation-level parameters and support short keys without repeating the implementation prefix. Existing flat vector field options such as fields.embedding.dimension and fields.embedding.nlist remain supported.

These declarations do not schedule builds in standalone Paimon. Continue to use the index build commands, or the index scheduling service provided by your catalog. Data Evolution indexes address table-wide row IDs; primary-key indexes retain their bucket-local compaction lifecycle.

The example table below is shared by the BTree, Bitmap, Multivalue, Vector, and Full-Text guides. It contains three-dimensional sample vectors and is partitioned by dt, so the partition-scoped build and drop examples also apply. Create and populate it once using one of the following alternatives.

CREATE TABLE my_table (
id INT,
name STRING,
category STRING,
tag STRING,
tags ARRAY<STRING>,
embedding ARRAY<FLOAT>,
content STRING,
dt STRING
) PARTITIONED BY (dt) TBLPROPERTIES (
'row-tracking.enabled' = 'true',
'data-evolution.enabled' = 'true'
);

INSERT INTO my_table VALUES
(101, 'a200', 'electronics', 'vip', array('blue', 'green'),
array(1.0f, 0.0f, 0.0f), 'paimon lake format and search', '2026-06-18'),
(102, 'a300', 'electronics', 'trial', array('green'),
array(0.9f, 0.1f, 0.0f), 'paimon full text search', '2026-06-18'),
(103, 'a400', 'books', 'standard', array('red'),
array(0.0f, 1.0f, 0.0f), 'vector search tutorial', '2026-06-19');

The sample vectors illustrate the API; they are not model-generated embeddings. For real data, use the same model, dimension, and preprocessing for stored and query vectors. The Hybrid Search guide creates a separate table with two vector columns.

Lifecycle​

  1. Load rows into the table.
  2. Build indexes for the columns and partitions used by queries.
  3. Inspect row-ID coverage.
  4. Query through the relevant index or search API, then build again after ingesting more rows.

Use Manage Global Indexes for SQL/Python build and drop examples, inspection queries, and visibility callbacks.

Coverage and Freshness​

Choose fast, full, or detail according to how queries should include uncovered rows. See the search-mode comparison. Updates to indexed values also need an update policy and index refresh; row-ID coverage alone does not prove that indexed values are current.

Build Options​

See shared options for shard sizing, build parallelism, update policy, and search modes. Each index page documents its own format and tuning options.

Use the index selection table above to open build and query examples.