# HG changeset patch # User ymh # Date 1320418439 -3600 # Node ID cd389bf882f114246ff986088f5e5fc8d95d6277 # Parent b435f8055cb4b634257c2d3dc83eda07bb25c00c Some small corrections diff -r b435f8055cb4 -r cd389bf882f1 Command/SyncDocumentsCommand.php --- a/Command/SyncDocumentsCommand.php Fri Nov 04 11:56:59 2011 +0100 +++ b/Command/SyncDocumentsCommand.php Fri Nov 04 15:53:59 2011 +0100 @@ -50,7 +50,11 @@ //TODO : check class to implement DocumentInterface //TODO : write progress $doclist = $rep->findAll(); + $total = count($doclist); + $done = 0; foreach ($doclist as $doc) { + $done++; + $output->writeln("Process doc id ".$doc->getId()." $done/$total ".strval(intval(floatval($done)/floatval($total)*100.0))."%"); $docrep->writeDocument($doc, $this->getContainer()->getParameter('wiki_tag.document_id_column'), $this->getContainer()->getParameter('wiki_tag.fields')); } $doctrine->getEntityManager()->flush(); diff -r b435f8055cb4 -r cd389bf882f1 Resources/config/services.yml --- a/Resources/config/services.yml Fri Nov 04 11:56:59 2011 +0100 +++ b/Resources/config/services.yml Fri Nov 04 15:53:59 2011 +0100 @@ -3,6 +3,7 @@ wiki_tag.document_listener.class: IRI\Bundle\WikiTagBundle\Listener\DocumentListener wiki_tag.wiki_tag_document_listener.class: IRI\Bundle\WikiTagBundle\Listener\WikiTagDocumentListener wiki_tag.shema_utils.class: IRI\Bundle\WikiTagBundle\Utils\SchemaUtils + wiki_tag.search_class: IRI\Bundle\WikiTagBundle\Search\Search services: @@ -22,6 +23,10 @@ wiki_tag.shema_utils: class: %wiki_tag.shema_utils.class% arguments: [@service_container] + + wiki_tag.search: + class: %wiki_tag.search_class% + arguments: [@service_container] # wiki_tag.example: # class: %wiki_tag.example.class%