Reindexing a workspace
Reindexing a workspace in Magnolia CMS rebuilds the search index to ensure content is searchable, typically after configuration changes or repository issues. Follow these steps to reindex a workspace.
| This page describes the manual way of reindexing on a self-hosted instance. In DX Cloud, it can be done with the Delete indexes action in the Cockpit. For more information, see Delete indexes and workloads after restore. |
Procedure
-
Locate the workspace directory
Navigate to the workspace folder at
/<CATALINA_HOME>/webapps/<contextPath>/repositories/magnolia/workspaces/<workspace_name>, where<workspace_name>is the specific workspace (website,contacts, and so on). Each workspace contains aworkspace.xmlfile that configures indexing settings. -
Create a full backup of the instance
Before reindexing, create a full backup of the instance. For more information about this, see Backing up and restoring instances.
-
Shut down the Magnolia instance
-
Delete the
indexsubfolder-
Delete the
indexsubfolder in the specific workspace directory (/<CATALINA_HOME>/webapps/<contextPath>/repositories/magnolia/workspaces/<workspace_name>/index).
-
-
Optional: Update indexing configuration
-
For more details, see Search and Custom configuration file.
-
-
Restart Magnolia
Start the Magnolia instance. The system automatically rebuilds the index for the workspace upon startup. Reindexing time depends on the amount of data in the workspace.
-
Check for errors
Monitor the startup process for errors. If the repository is corrupted, reindexing may fail, and you may need to address the underlying issues.
Additional notes
-
The
onWorkspaceInconsistencyparameterIf a workspace performs a re-indexing on startup and finds an inconsistency, the re-indexing process will fail.
Add the
OnWorkspaceInconsistencyparameter in theworkspace.xmlfile to prevent the failure. The process will just log the inconsistency.<param name="onWorkspaceInconsistency" value="log"/> -
Ensure the Magnolia instance has sufficient resources, as reindexing large datasets can be resource-intensive.
-
For complex setups, contact and consult our Magnolia DX Core support.