public function runGroup(
        LoggerInterface $logger,
        SolrIndex $indexInstance,
        $state,
        $class,
        $groups,
        $group
    ) {
        // Set time limit and state
        Environment::increaseTimeLimitTo();
        SearchVariant::activate_state($state);
        $logger->info("Adding $class");

        // Prior to adding these records to solr, delete existing solr records
        $this->clearRecords($indexInstance, $class, $groups, $group);

        // Process selected records in this class
        $items = $this->getRecordsInGroup($indexInstance, $class, $groups, $group);
        $processed = array();
        foreach ($items as $item) {
            $processed[] = $item->ID;

            // By this point, obsolete classes/states have been removed in processVariant
            // and obsolete records have been removed in clearRecords
            $indexInstance->add($item);
            $item->destroy();
        }
        $logger->info("Updated " . implode(',', $processed));

        // This will slow down things a tiny bit, but it is done so that we don't timeout to the database during a reindex
        DB::query('SELECT 1');

        $logger->info("Done");
    }
public function runGroup(
        LoggerInterface $logger,
        SolrIndex $indexInstance,
        $state,
        $class,
        $groups,
        $group
    ) {
        // Set time limit and state
        Environment::increaseTimeLimitTo();
        SearchVariant::activate_state($state);
        $logger->info("Adding $class");

        // Prior to adding these records to solr, delete existing solr records
        $this->clearRecords($indexInstance, $class, $groups, $group);

        // Process selected records in this class
        $items = $this->getRecordsInGroup($indexInstance, $class, $groups, $group);
        $processed = array();
        foreach ($items as $item) {
            $processed[] = $item->ID;

            // By this point, obsolete classes/states have been removed in processVariant
            // and obsolete records have been removed in clearRecords
            $indexInstance->add($item);
            $item->destroy();
        }
        $logger->info("Updated " . implode(',', $processed));

        // This will slow down things a tiny bit, but it is done so that we don't timeout to the database during a reindex
        DB::query('SELECT 1');

        $logger->info("Done");
    }
public function runGroup ( LoggerInterface $ logger , SolrIndex $ indexInstance , $ state , $ class , $ groups , $ group ) { // Set time limit and state Environment :: increaseTimeLimitTo ( ) ; SearchVariant :: activate_state ( $ state ) ; $ logger -> info ( "Adding $class" ) ; // Prior to adding these records to solr, delete existing solr records $ this -> clearRecords ( $ indexInstance , $ class , $ groups , $ group ) ; // Process selected records in this class $ items = $ this -> getRecordsInGroup ( $ indexInstance , $ class , $ groups , $ group ) ; $ processed = array ( ) ; foreach ( $ items as $ item ) { $ processed [ ] = $ item -> ID ; // By this point, obsolete classes/states have been removed in processVariant // and obsolete records have been removed in clearRecords $ indexInstance -> add ( $ item ) ; $ item -> destroy ( ) ; } $ logger -> info ( "Updated " . implode ( ',' , $ processed ) ) ; // This will slow down things a tiny bit, but it is done so that we don't timeout to the database during a reindex DB :: query ( 'SELECT 1' ) ; $ logger -> info ( "Done" ) ; }
Explicitly invoke the process that performs the group
processing. Can be run either by a background task or a queuedjob.

Does not commit changes to the index, so this must be controlled externally.

@param LoggerInterface $logger
@param SolrIndex $indexInstance
@param array $state
@param string $class
@param int $groups
@param int $group
Explicitly invoke the process that performs the group processing . Can be run either by a background task or a queuedjob .