Get Indexes Operation

  • Use GetIndexesOperation to retrieve multiple index definitions from the database.

  • The operation will execute on the node defined by the client configuration.
    However, the index definitions returned are taken from the database record,
    which is common to all the database-group nodes.
    i.e., an index state change done only on a local node is not reflected.

  • To get a specific index state on a local node use GetIndexStatisticsOperation.

  • In this page:

Get Indexes example

# Define the get indexes operation
# Pass number of indexes to skip & number of indexes to retrieve
get_index_op = GetIndexesOperation(0, 10)

# Execute the operation by passing it to maintenance.send
indexes = store.maintenance.send(get_index_op)

# indexes will contain the first 10 indexes, alphabetically ordered by index name
# Access an index definition from the resulting list:
name = indexes[0].name
state = indexes[0].state
lock_mode = indexes[0].lock_mode
deployment_mode = indexes[0].deployment_mode
# etc.


class GetIndexesOperation(MaintenanceOperation[List[IndexDefinition]]):
    def __init__(self, start: int, page_size: int): ...
Parameters Type Description
start int Number of indexes to skip
page_size int Number of indexes to retrieve
Return value of store.Maintenance.Send(getIndexesOp) Description
IndexDefinition[] A list of IndexDefinition classes,
ordered alphabetically by index name.