public function reindex($className)
    {
        $this->checkImplementsSearchableInterface($className);
        $activeRecord = $this->activeRecordFactory->make($className);

        $records = $this->activeQueryChunker->chunk(
            $activeRecord->find(),
            self::CHUNK_SIZE,
            function ($activeRecordEntities) {
                return $this->getAlgoliaRecordsFromSearchableModelArray($activeRecordEntities);
            }
        );

        /* @var SearchableInterface $activeRecord */
        $indices = $this->initIndices($activeRecord);

        return $this->processIndices($indices, function (Index $index) use ($records) {
            return $this->reindexAtomically($index, $records);
        });
    }
public function reindex($className)
    {
        $this->checkImplementsSearchableInterface($className);
        $activeRecord = $this->activeRecordFactory->make($className);

        $records = $this->activeQueryChunker->chunk(
            $activeRecord->find(),
            self::CHUNK_SIZE,
            function ($activeRecordEntities) {
                return $this->getAlgoliaRecordsFromSearchableModelArray($activeRecordEntities);
            }
        );

        /* @var SearchableInterface $activeRecord */
        $indices = $this->initIndices($activeRecord);

        return $this->processIndices($indices, function (Index $index) use ($records) {
            return $this->reindexAtomically($index, $records);
        });
    }
public function reindex ( $ className ) { $ this -> checkImplementsSearchableInterface ( $ className ) ; $ activeRecord = $ this -> activeRecordFactory -> make ( $ className ) ; $ records = $ this -> activeQueryChunker -> chunk ( $ activeRecord -> find ( ) , self :: CHUNK_SIZE , function ( $ activeRecordEntities ) { return $ this -> getAlgoliaRecordsFromSearchableModelArray ( $ activeRecordEntities ) ; } ) ; /* @var SearchableInterface $activeRecord */ $ indices = $ this -> initIndices ( $ activeRecord ) ; return $ this -> processIndices ( $ indices , function ( Index $ index ) use ( $ records ) { return $ this -> reindexAtomically ( $ index , $ records ) ; } ) ; }
Re-indexes the indices safely for the given ActiveRecord Class.

@param string $className The name of the ActiveRecord to be indexed

@return array
Re - indexes the indices safely for the given ActiveRecord Class .