public function triggerReindex()
    {
        if (!$this->owner->ID) {
            return;
        }

        $id = $this->owner->ID;
        $class = $this->owner->ClassName;
        $state = SearchVariant::current_state($class);
        $base = DataObject::getSchema()->baseDataClass($class);
        $key = "$id:$base:" . serialize($state);

        $statefulids = array(array(
            'id' => $id,
            'state' => $state
        ));

        $writes = array(
            $key => array(
                'base' => $base,
                'class' => $class,
                'id' => $id,
                'statefulids' => $statefulids,
                'fields' => array()
            )
        );

        SearchUpdater::process_writes($writes);
    }
public function triggerReindex()
    {
        if (!$this->owner->ID) {
            return;
        }

        $id = $this->owner->ID;
        $class = $this->owner->ClassName;
        $state = SearchVariant::current_state($class);
        $base = DataObject::getSchema()->baseDataClass($class);
        $key = "$id:$base:" . serialize($state);

        $statefulids = array(array(
            'id' => $id,
            'state' => $state
        ));

        $writes = array(
            $key => array(
                'base' => $base,
                'class' => $class,
                'id' => $id,
                'statefulids' => $statefulids,
                'fields' => array()
            )
        );

        SearchUpdater::process_writes($writes);
    }
public function triggerReindex ( ) { if ( ! $ this -> owner -> ID ) { return ; } $ id = $ this -> owner -> ID ; $ class = $ this -> owner -> ClassName ; $ state = SearchVariant :: current_state ( $ class ) ; $ base = DataObject :: getSchema ( ) -> baseDataClass ( $ class ) ; $ key = "$id:$base:" . serialize ( $ state ) ; $ statefulids = array ( array ( 'id' => $ id , 'state' => $ state ) ) ; $ writes = array ( $ key => array ( 'base' => $ base , 'class' => $ class , 'id' => $ id , 'statefulids' => $ statefulids , 'fields' => array ( ) ) ) ; SearchUpdater :: process_writes ( $ writes ) ; }
Forces this object to trigger a re-index in the current state
Forces this object to trigger a re - index in the current state