protected function _writeIndex( MW_Common_Criteria_Interface $search, array $domains, $size )
	{
		$manager = MShop_Factory::createManager( $this->_getContext(), 'product' );
		$start = 0;

		do
		{
			$search->setSlice( $start, $size );
			$products = $manager->searchItems( $search, $domains );

			try
			{
				$this->begin();

				$this->deleteItems( array_keys( $products ) );

				foreach ( $this->_getSubManagers() as $submanager ) {
					$submanager->rebuildIndex( $products );
				}

				$this->_saveSubProducts( $products );

				$this->commit();
			}
			catch( Exception $e )
			{
				$this->_rollback();
				throw $e;
			}

			$count = count( $products );
			$start += $count;
		}
		while( $count == $search->getSliceSize() );
	}