Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #18472: Section changes are not correctly indexed

  • Loading branch information...
commit 75ced059762619eb778ccec367a63ca46791163b 1 parent 604a44b
@dpobel dpobel authored
Showing with 21 additions and 0 deletions.
  1. +21 −0 search/plugins/ezsolr/ezsolr.php
View
21 search/plugins/ezsolr/ezsolr.php
@@ -1343,6 +1343,27 @@ public function updateNodeSection( $nodeID, $sectionID )
}
/**
+ * 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.
*
Please sign in to comment.
Something went wrong with that request. Please try again.