system index-blocks

Retrieves partition and segment-level metadata for table indexes.

Command properties

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

Syntax

system index-blocks [terms={t|f}] [termlimit=LONG] [blocklimit=LONG] [blockoffset=LONG] TABLE INDEX [DAY [SK [ERA]]]

Options

terms={t|f}
Retrieves term data for each index field. (Default: f)
  • t: Include term data in the results
  • f: Do not retrieve term data
termlimit=LONG
When terms=t, limits the maximum number of terms to retrieve per field. Must be used together with terms=t.
blocklimit=LONG
Limits the maximum number of segments (blocks) to retrieve.
blockoffset=LONG
Specifies the starting position of segments to retrieve. (Default: 0)

Targets

TABLE
Name of the table to query. Required.
INDEX
Name of the index to query. Required.
[DAY]
Partition date in yyyyMMdd format. If not specified, all partitions are queried.
[SK]
Partition sub-key as a hexadecimal long value. If not specified, the retrieval range is not restricted.
[ERA]
Partition identifier. If not specified, the retrieval range is not restricted.

Output fields

Base segment information fields:

FieldTypeDescription
tablestringTable name
indexstringIndex name
partitionstringPartition identifier string
sto_classintegerStorage class number. 09,999: Hot tier, 10,00019,999: Warm tier, 20,00029,999: Cold tier
sto_pathstringAbsolute path of the directory where segment files are stored
seg_idlongSegment ID
min_idlongMinimum record ID in the segment. Not returned when reserved is true.
max_idlongMaximum record ID in the segment. Not returned when reserved is true.
min_timetimestampMinimum timestamp in the segment
max_timetimestampMaximum timestamp in the segment
verlongSegment version. Not returned when reserved is true.
reservedbooleanWhether the segment is reserved
field_cntintegerNumber of fields in the segment
seg_offsetlongStart offset of the segment data
fieldsstringList of fields. Displayed per line in fieldname:type:termblocksize format.

Additional fields returned when terms=t is specified:

FieldTypeDescription
field_namestringName of the field the term belongs to
field_typestringField type (STRING or LONG)
termstring or longTerm value
posting_countlongNumber of records containing the term

Error codes

Parsing errors
Error codeMessageDescription
95061missing-table-optionTable name was not specified
95062missing-index-optionIndex name was not specified
95063invalid-table-nameTable name is invalid
95064no-table-read-permissionThe user does not have read permission for the table
95113invalid-day-optionThe DAY value is not in yyyyMMdd format
95114invalid-subkey-optionThe SK value is not a valid hexadecimal long
95115invalid-era-optionThe ERA value is invalid
95117invalid-long-valueThe termlimit, blocklimit, or blockoffset value is invalid
95118termlimit-option-given-without-termstermlimit was specified without terms=t
95132missing-argsRequired arguments are missing
Runtime errors
Error codeMessageDescriptionPost-processing
95064no-table-read-permissionThe user does not have read permission for the tableQuery aborted
92003table-not-foundThe specified table does not existQuery aborted
92005index-not-foundThe specified index does not existQuery aborted

Description

The system index-blocks command retrieves segment-level metadata for table indexes. You can view each segment's ID, timestamp range, storage class, storage path, and field information.

When the terms=t option is specified, term data for each field is also returned in addition to the segment records. The termlimit option limits the maximum number of terms per field and must be used together with terms=t.

Use the blocklimit and blockoffset options to restrict the range of segments to retrieve, enabling paginated retrieval of large indexes.

Examples

  1. Retrieve segments for a specific table index

    system index-blocks SONAR_EVENTS default_idx
    

    Retrieves the segment list for the default_idx index of the SONAR_EVENTS table.

  2. Retrieve segments for a specific date partition

    system index-blocks SONAR_EVENTS default_idx 20260301
    

    Retrieves segments for the March 1, 2026 partition of the default_idx index in the SONAR_EVENTS table.

  3. Retrieve with term data included

    system index-blocks terms=t termlimit=10 SONAR_EVENTS default_idx 20260301
    

    Retrieves segments for the March 1, 2026 partition along with up to 10 term entries per field.

  4. Retrieve with a segment count limit

    system index-blocks blocklimit=100 SONAR_EVENTS default_idx
    

    Retrieves up to 100 segments for the default_idx index of the SONAR_EVENTS table.