Skip to main content
Use POST /tables/inferIndexes and POST /tables/applyIndexes to build an index-editing workflow around a Pinot table config and schema.
  • inferIndexes converts the table config into the index-grid shape used by StarTree tooling.
  • applyIndexes converts an edited index-grid shape back into an updated table config.
These endpoints are configuration helpers. They do not create a table, update a table, rebuild segments, or reload data.
applyIndexes returns updatedTableConfig. Persist the returned table config with the normal table update flow, then reload or regenerate affected segments when the changed index type requires segment changes.

Endpoints

When to Use These Endpoints

Use these endpoints when you want to:
  • Build an index editor that starts from an existing table config and schema.
  • Normalize older table configs into the field-config based index model.
  • Convert dictionary-disabled fields into RAW column encoding.
  • Edit per-column index settings without hand-writing the full fieldConfigList.
  • Preserve sorted columns and star-tree index configs while round-tripping through an index UI.

Infer Existing Indexes

inferIndexes accepts a table config and schema. The response contains per-column index settings, column encodings, sorted columns, star-tree index configs, and an updated table config.
Example request:
Example response shape:

Apply Edited Indexes

applyIndexes accepts the table config, schema, and edited index settings. The response contains an updated table config with the requested index changes applied. Required request fields: Example request:
Example request:
Example response shape:

Round-Trip Workflow

  1. Fetch the current table config and schema.
  2. Call POST /tables/inferIndexes.
  3. Present indexConfigMap, columnEncodings, sortedColumns, and starTreeIndexConfigs to the user or automation.
  4. Edit the desired index settings.
  5. Call POST /tables/applyIndexes with the original table config, schema, and edited index data.
  6. Review updatedTableConfig.
  7. Persist updatedTableConfig with the table update API.
  8. Reload or regenerate segments when the changed index type requires segment materialization.

Field Behavior

Dictionary and Raw Encoding Notes

applyIndexes keeps dictionary configuration and column encoding consistent:
  • A column with RAW encoding does not keep a dictionary index for Pinot local tables.
  • Dictionary-disabled field configs are normalized to RAW encoding.
  • External table configs keep dictionary metadata that is needed by the external table flow.

Troubleshooting