Author: rande
Date: 2010-05-10 23:19:03 +0200 (Mon, 10 May 2010)
New Revision: 29405

Modified:
   plugins/sfSolrPlugin/branches/sf1.2/lib/task/sfLuceneCleanupTask.class.php
Log:
[sfSolrPlugin] fix clean task

Modified: 
plugins/sfSolrPlugin/branches/sf1.2/lib/task/sfLuceneCleanupTask.class.php
===================================================================
--- plugins/sfSolrPlugin/branches/sf1.2/lib/task/sfLuceneCleanupTask.class.php  
2010-05-10 20:59:04 UTC (rev 29404)
+++ plugins/sfSolrPlugin/branches/sf1.2/lib/task/sfLuceneCleanupTask.class.php  
2010-05-10 21:19:03 UTC (rev 29405)
@@ -24,7 +24,7 @@
   {
     $this->addArguments(array(
       new sfCommandArgument('application', sfCommandArgument::REQUIRED, 'The 
application name'),
-      new sfCommandArgument('confirmation', sfCommandArgument::OPTIONAL, 
'Confirmation to delete')
+      new sfCommandArgument('confirmation', sfCommandArgument::OPTIONAL, 
'Confirmation to delete, enter `delete`')
     ));
 
     $this->addOptions(array(
@@ -63,8 +63,8 @@
 
       foreach ($instances as $instance)
       {
-        $query = '*:*';
-        $instance->getLucene()->deleteByQuery($query);
+        $instance->getLucene()->deleteByQuery('*:*');
+        $instance->getLucene()->commit();
         $this->dispatcher->notify(new sfEvent($this, 'command.log', 
array($this->formatter->format('Delete '.$instance->getPublicName() , 
array('fg' => 'red', 'bold' => true)))));
       }
     }

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-svn?hl=en.

Reply via email to