def METHOD_NAME(self, context: TracimContext) -> None:
    print("Indexing all workspaces")
    if context.app_config.SEARCH__ENGINE == "simple":
        return
    indexed_workspace_count = 0
    workspace_api = WorkspaceApi(
        current_user=None, session=context.dbsession, config=context.app_config
    )
    for workspace in workspace_api.get_all():
        ESWorkspaceIndexer().index_workspace(workspace, context)
        indexed_workspace_count += 1
    print("{} space(s) were indexed".format(indexed_workspace_count))