// we let the search plugin deal with the indexation and flag the nodes not to be reindexed
    eZContentOperationCollection::registerSearchObject($object_id, false);
    eZContentObject::clearCache();
}

$i = 0;

//solrObjects
foreach($solrJsonObjects as $solrJsonObject)
{
    if (!($i%200) )
    {
        echo "Traitement Solr : $i\n";
    }

    $i++;

    $solrIndexationJob = new SolrIndexationJob(null);
    $solrIndexationJob->setAttribute('data', $solrJsonObject);
    $solrIndexationJob->store();
}

// Purge varnish cache of listing sort by most views :
echo "Purge varnish cache of listing sort by most views (".count($varnish_node_ids)." objects)\n";
$varnishControl = new VarnishControl();
$varnishControl->banMostViews( $varnish_node_ids );
// Purge varnish cache for homepage
echo "Purge varnish cache for homepage";
$varnishControl->banUri('/esibuild/main_view/app_content//');