Author: rande
Date: 2010-02-15 17:56:11 +0100 (Mon, 15 Feb 2010)
New Revision: 28042

Modified:
   
plugins/sfSolrPlugin/branches/sf1.2/lib/indexer/sfLuceneDoctrineIndexerHandler.class.php
Log:
[sfSolrPlugin] fix deletion by ids

Modified: 
plugins/sfSolrPlugin/branches/sf1.2/lib/indexer/sfLuceneDoctrineIndexerHandler.class.php
===================================================================
--- 
plugins/sfSolrPlugin/branches/sf1.2/lib/indexer/sfLuceneDoctrineIndexerHandler.class.php
    2010-02-15 16:19:59 UTC (rev 28041)
+++ 
plugins/sfSolrPlugin/branches/sf1.2/lib/indexer/sfLuceneDoctrineIndexerHandler.class.php
    2010-02-15 16:56:11 UTC (rev 28042)
@@ -95,7 +95,8 @@
         );
         continue;
       }
-      $documents[] = $doc;
+
+      $documents[$doc->sfl_guid] = $doc;
       
       $field = $doc->getField('id');
       
@@ -109,8 +110,6 @@
     try
     {
       $search_engine->deleteByMultipleIds(array_keys($documents));
-      $search_engine->commit();
-
       $search_engine->addDocuments($documents);
       $search_engine->commit();
 
@@ -118,7 +117,7 @@
          new sfEvent(
            $this,
            'indexer.log',
-           array('indexing ok - primary keys [%s]', implode(', ', $pks))
+           array('indexing %s objects - primary keys [%s]', count($documents), 
implode(', ', $pks))
          )
       );
     }

-- 
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