Permalink
Browse files

Fixed #18472: Section changes are not correctly indexed

  • Loading branch information...
1 parent 604a44b commit 75ced059762619eb778ccec367a63ca46791163b @dpobel dpobel committed Aug 4, 2011
Showing with 21 additions and 0 deletions.
  1. +21 −0 search/plugins/ezsolr/ezsolr.php
@@ -1342,6 +1342,27 @@ public function updateNodeSection( $nodeID, $sectionID )
$this->addObject( $contentObject );
}
+ /**
+ * Update the section in the search engine
+ *
+ * @param array $objectID
+ * @param int $sectionID
+ * @return void
+ * @see eZSearch::updateObjectsSection()
+ */
+ public function updateObjectsSection( array $objectIDs, $sectionID )
+ {
+ foreach( $objectIDs as $id )
+ {
+ $object = eZContentObject::fetch( $id );
+ // we may be inside a DB transaction running update queries for the
+ // section id or the content object may come from the memory cache
+ // make sure the section_id is the right one
+ $object->setAttribute( 'section_id', $sectionID );
+ $this->addObject( $object );
+ }
+ }
+
/**
* Called when a node's visibility is modified.
* Simply re-index for now.

0 comments on commit 75ced05

Please sign in to comment.