system indices

Retrieves metadata for indexes created on each table.

Command properties

PropertyDescription
Command typeDriver query
Required permissionNone (table read permission required)
License usageNot counted
Parallel executionNot supported
Distributed executionNot supported

Syntax

system indices [verbose={t|f}] [TABLE_PATTERN]

Options

verbose={t|f}
Also retrieves storage consumption (storage_consumption) information. (Default: f)
  • t: Include storage consumption in the results
  • f: Do not retrieve storage consumption
TABLE_PATTERN
Table pattern to query. You can specify multiple patterns separated by commas (,). If not specified, all tables for which you have read permission are queried.

Output fields

FieldTypeDescription
tablestringTable name
indexstringIndex name
use_bloom_filterbooleanWhether bloom filter is enabled. true: enabled, false: disabled
base_pathstringIndex storage path (absolute). Returned only for sessions with cluster administrator permission.
tokenizer_namestringName of the tokenizer used for index token extraction
tokenizer_configsobjectTokenizer configuration values (e.g., query string)
min_index_daystringEarliest date referenced by the index (yyyy-MM-dd format). Null if not configured.
max_index_daystringLatest date referenced by the index (yyyy-MM-dd format). Null if not configured.
indexed_daysstringDate range for which index partitions actually exist (yyyy-MM-dd ~ yyyy-MM-dd format). N/A if none exist.
storage_consumptionlongIndex storage size (bytes). Returned only when verbose=t is specified.
build_past_indexbooleanWhether past data is also indexed when creating the index

Error codes

Parsing errors
Error codeMessageDescription
95101invalid-verbose-optionThe verbose option value is invalid
95102invalid-table-patternThe table pattern is invalid
Runtime errors

N/A

Description

The system indices command retrieves configuration information for indexes on each table. You can view the index name, bloom filter status, tokenizer settings, and indexed date range.

The base_path field is returned only for sessions with cluster administrator permission. The storage_consumption field is returned only when verbose=t is specified and represents the total size of all files in the index directory.

Table patterns support wildcards (*) at the beginning or end of the name.

Examples

  1. Retrieve index metadata for all tables

    system indices
    

    Retrieves index metadata for all tables for which you have read permission.

  2. Retrieve indexes for a specific table

    system indices SONAR_EVENTS
    

    Retrieves index metadata for the SONAR_EVENTS table.

  3. Retrieve with storage consumption included

    system indices verbose=t
    | eval size_mb = round(storage_consumption / 1048576, 2)
    | fields table, index, size_mb, indexed_days
    | sort -size_mb
    

    Converts index storage sizes to MB and retrieves them sorted from largest to smallest.

  4. Retrieve indexes that use bloom filter

    system indices
    | search use_bloom_filter == true
    | fields table, index, tokenizer_name, indexed_days
    

    Filters and retrieves only indexes with bloom filter enabled.