Reset Index Operation
-
Use
ResetIndexOperation
to rebuild an index:- All existing indexed data will be removed.
- All items matched by the index definition will be re-indexed.
-
Indexes scope:
- Both static and auto indexes can be reset.
-
Nodes scope:
- When resetting an index from the client:
The index is reset only on the preferred node only, and Not on all the database-group nodes. - When resetting an index from the Studio indexes list view:
The index is reset on the local node the browser is opened on, even if it is Not the preferred node.
- When resetting an index from the client:
-
If the index is disabled or paused, resetting the index will put it back to the normal running state on the local node where the action was performed.
-
In this page:
Reset index
# Define the reset index operation, pass index name
reset_index_op = ResetIndexOperation("Orders/Totals")
# Execute the operation by passing it to maintenance.send
# An exception will be thrown if index does not exist
store.operations.send(reset_index_op)
Syntax
class ResetIndexOperation(VoidMaintenanceOperation):
def __init__(self, index_name: str): ...
Parameters | Type | Description |
---|---|---|
index_name | str |
Name of an index to reset |