public function onAfterWrite() {
		if (!self::$indexing) return;

		// No longer doing the 'ischanged' check to avoid problems with multivalue field NOT being indexed
		//$changes = $this->owner->getChangedFields(true, 2);
			
		$stage = null;
		// if it's being written and a versionable, then save only in the draft
		// repository. 
		if ($this->owner->hasMethod('canBeVersioned') && $this->owner->canBeVersioned($this->owner->baseTable())) {
            $stage = Versioned::current_stage();
		}

		if ($this->canShowInSearch()) {
            // DataObject::write() does _not_ set LastEdited until _after_ onAfterWrite completes
            $this->owner->LastEdited = date('Y-m-d H:i:s');
			$this->reindex($stage);
		}
	}