concrete/src/Page/Search/Index/PageIndex.php
public function clear()
    {
        /** @var PageCategory $pageCategory */
        $pageCategory = $this->app[PageCategory::class];

        /** @var PageKey $key */
        foreach ($pageCategory->getList() as $key) {
            /** @var SearchIndexerInterface $indexer */
            $indexer = $key->getSearchIndexer();

            // Update the key tables
            $indexer->updateSearchIndexKeyColumns($pageCategory, $key);
        }

        // Truncate the existing search index
        $database = $this->app['database']->connection();
        $database->Execute('truncate table PageSearchIndex');
    }
public function clear()
    {
        /** @var PageCategory $pageCategory */
        $pageCategory = $this->app[PageCategory::class];

        /** @var PageKey $key */
        foreach ($pageCategory->getList() as $key) {
            /** @var SearchIndexerInterface $indexer */
            $indexer = $key->getSearchIndexer();

            // Update the key tables
            $indexer->updateSearchIndexKeyColumns($pageCategory, $key);
        }

        // Truncate the existing search index
        $database = $this->app['database']->connection();
        $database->Execute('truncate table PageSearchIndex');
    }
public function clear ( ) { /** @var PageCategory $pageCategory */ $ pageCategory = $ this -> app [ PageCategory :: class ] ; /** @var PageKey $key */ foreach ( $ pageCategory -> getList ( ) as $ key ) { /** @var SearchIndexerInterface $indexer */ $ indexer = $ key -> getSearchIndexer ( ) ; // Update the key tables $ indexer -> updateSearchIndexKeyColumns ( $ pageCategory , $ key ) ; } // Truncate the existing search index $ database = $ this -> app [ 'database' ] -> connection ( ) ; $ database -> Execute ( 'truncate table PageSearchIndex' ) ; }
Clear out all indexed items
@return void
Clear out all indexed items