public function updateIdxContent(AbstractClassContent $content)
    {
        $query = 'INSERT INTO idx_content_content (content_uid, subcontent_uid) '.
                '(SELECT :child, content_uid FROM content_has_subcontent WHERE parent_uid = :child) '.
                'UNION DISTINCT (SELECT parent_uid, :child FROM content_has_subcontent WHERE content_uid = :child) '.
                'UNION DISTINCT (SELECT i.content_uid, :child FROM idx_content_content i WHERE i.subcontent_uid IN (SELECT parent_uid FROM content_has_subcontent WHERE content_uid = :child)) '.
                'UNION DISTINCT (SELECT :child, i.subcontent_uid FROM idx_content_content i WHERE i.content_uid IN (SELECT content_uid FROM content_has_subcontent WHERE parent_uid = :child)) '.
                'UNION DISTINCT (SELECT :child, :child)';

        $params = array(
            'child' => $content->getUid(),
        );

        return $this->removeIdxContentContent($content)
                        ->executeUpdate($query, $params)
                        ->updateIdxPage($content->getMainNode(), $content);
    }
public function updateIdxContent(AbstractClassContent $content)
    {
        $query = 'INSERT INTO idx_content_content (content_uid, subcontent_uid) '.
                '(SELECT :child, content_uid FROM content_has_subcontent WHERE parent_uid = :child) '.
                'UNION DISTINCT (SELECT parent_uid, :child FROM content_has_subcontent WHERE content_uid = :child) '.
                'UNION DISTINCT (SELECT i.content_uid, :child FROM idx_content_content i WHERE i.subcontent_uid IN (SELECT parent_uid FROM content_has_subcontent WHERE content_uid = :child)) '.
                'UNION DISTINCT (SELECT :child, i.subcontent_uid FROM idx_content_content i WHERE i.content_uid IN (SELECT content_uid FROM content_has_subcontent WHERE parent_uid = :child)) '.
                'UNION DISTINCT (SELECT :child, :child)';

        $params = array(
            'child' => $content->getUid(),
        );

        return $this->removeIdxContentContent($content)
                        ->executeUpdate($query, $params)
                        ->updateIdxPage($content->getMainNode(), $content);
    }
public function updateIdxContent ( AbstractClassContent $ content ) { $ query = 'INSERT INTO idx_content_content (content_uid, subcontent_uid) ' . '(SELECT :child, content_uid FROM content_has_subcontent WHERE parent_uid = :child) ' . 'UNION DISTINCT (SELECT parent_uid, :child FROM content_has_subcontent WHERE content_uid = :child) ' . 'UNION DISTINCT (SELECT i.content_uid, :child FROM idx_content_content i WHERE i.subcontent_uid IN (SELECT parent_uid FROM content_has_subcontent WHERE content_uid = :child)) ' . 'UNION DISTINCT (SELECT :child, i.subcontent_uid FROM idx_content_content i WHERE i.content_uid IN (SELECT content_uid FROM content_has_subcontent WHERE parent_uid = :child)) ' . 'UNION DISTINCT (SELECT :child, :child)' ; $ params = array ( 'child' => $ content -> getUid ( ) , ) ; return $ this -> removeIdxContentContent ( $ content ) -> executeUpdate ( $ query , $ params ) -> updateIdxPage ( $ content -> getMainNode ( ) , $ content ) ; }
Replace content-content indexes for the provided content
Also replace page-content indexes if content has a main node.

@param AbstractClassContent $content

@return IndexationRepository
Replace content - content indexes for the provided content Also replace page - content indexes if content has a main node .