public function reindex($stage = null) {

		// Make sure the current data object is not orphaned.

		if($this->owner->ParentID > 0) {
			$parent = $this->owner->Parent();
			if(is_null($parent) || ($parent === false)) {
				return;
			}
		}

		// Make sure the extension requirements have been met before enabling the custom site tree search index,
		// since this may impact performance.

		if((ClassInfo::baseDataClass($this->owner) === 'SiteTree')
			&& SiteTree::has_extension('SiteTreePermissionIndexExtension')
			&& SiteTree::has_extension('SolrSearchPermissionIndexExtension')
			&& ClassInfo::exists('QueuedJob')
		) {

			// Queue a job to handle the recursive indexing.
			$indexing = new SolrSiteTreePermissionIndexJob($this->owner, $stage);
			singleton('QueuedJobService')->queueJob($indexing);
		}
		else {

			// When the requirements haven't been met, trigger a normal index.
			$this->searchService->index($this->owner, $stage);
		}
	}