NeptuneData / Client / start_index_rebuild
start_index_rebuild¶
- NeptuneData.Client.start_index_rebuild(**kwargs)¶
Initiates an index rebuild operation to optimize storage and improve query performance. The rebuild operation reorganizes index to reclaim space and improve efficiency.
When invoking this operation in a Neptune cluster that has IAM authentication enabled, the IAM user or role making the request must have a policy attached that allows the neptune-db:StartIndexRebuild IAM action in that cluster.
See also: AWS API Documentation
Request Syntax
response = client.start_index_rebuild( scope='ALL'|'QUADS'|'DICTIONARIES', concurrency=123, writeBufferSize='LOW'|'MEDIUM'|'HIGH', clientToken='string' )
- Parameters:
scope (string) –
Specifies the scope of the rebuild operation. Possible values are:
ALL- Rebuild all (quads and dictionaries). This is the default if not specified.QUADS- Rebuild only the quad indexes.DICTIONARIES- Rebuild only the dictionaries.
concurrency (integer) –
The number of concurrent indexes to rebuild in parallel. If not specified, defaults to
1.Valid values are between
1and the number of vCPUs available on the writer instance. If the value exceeds the available vCPUs, it is capped at the maximum instead of returning anInvalidParameterException. The effective (capped) value is returned in the response.Higher concurrency can shorten the overall rebuild, but also increases CPU and I/O load during the operation.
writeBufferSize (string) –
Controls the buffer size used for tracking concurrent write operations during the index rebuild. If your database has high write traffic during the rebuild, a larger buffer prevents the operation from failing due to buffer overflow. Possible values are:
LOW- Suitable for databases with light to moderate write activity. This is the default.MEDIUM- Recommended for databases with sustained write traffic or bulk loading.HIGH- Use when rebuilding indexes during heavy write workloads or continuous bulk data ingestion.
If your rebuild fails and you are actively writing data to the database, retry with a higher
writeBufferSizevalue. For bulk load operations, consider usingHIGH.clientToken (string) –
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify a client token, the SDK automatically generates one.
This field is autopopulated if not provided.
- Return type:
dict
- Returns:
Response Syntax
{ 'status': 'PREPARING'|'REBUILDING'|'COMPLETED'|'FAILED'|'CANCELLED'|'CANCELLING', 'rebuildId': 'string', 'scope': 'ALL'|'QUADS'|'DICTIONARIES', 'concurrency': 123, 'writeBufferSize': 'LOW'|'MEDIUM'|'HIGH' }
Response Structure
(dict) –
status (string) –
The current status of the rebuild operation. See
RebuildStatusfor possible values.rebuildId (string) –
The unique identifier for the index rebuild job. Use this ID with the GetIndexRebuildStatus operation to check the progress of the rebuild.
scope (string) –
The scope of the rebuild operation that was requested. See
Scopefor possible values:ALL,QUADS, orDICTIONARIES.concurrency (integer) –
The effective concurrency used for this rebuild. This is the value supplied in the request, capped at the number of vCPUs on the writer instance.
writeBufferSize (string) –
The
WriteBufferSizeapplied to this rebuild. See theWriteBufferSizeenum for possible values.
Exceptions