Matthias Mullie has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/183040

Change subject: Make Reindexer agnostic of specific implementation
......................................................................

Make Reindexer agnostic of specific implementation

Change-Id: I123d559f9e398c40017a3b53875f9045f4eb52f4
---
M includes/Maintenance/Reindexer.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/40/183040/1

diff --git a/includes/Maintenance/Reindexer.php 
b/includes/Maintenance/Reindexer.php
index 3467cb2..3f5b170 100644
--- a/includes/Maintenance/Reindexer.php
+++ b/includes/Maintenance/Reindexer.php
@@ -254,7 +254,7 @@
                                'lang' => 'groovy'
                        ) );
                }
-               $pageProperties = $this->mappingConfig['page']['properties'];
+               $properties = 
$this->mappingConfig[$this->oldType->getName()]['properties'];
                try {
                        $query = new Query();
                        $query->setFields( array( '_id', '_source' ) );
@@ -296,7 +296,7 @@
                                        // out any old fields that we no longer 
use.  Note that this filter is only a single level which is
                                        // likely ok for us.
                                        $document = new Document( 
$result->current()->getId(),
-                                               array_intersect_key( 
$result->current()->getSource(), $pageProperties ) );
+                                               array_intersect_key( 
$result->current()->getSource(), $properties ) );
                                        // Note that while setting the opType 
to create might improve performance slightly it can cause
                                        // trouble if the scroll returns the 
same id twice.  It can do that if the document is updated
                                        // during the scroll process.  I'm 
unclear on if it will always do that, so you still have to

-- 
To view, visit https://gerrit.wikimedia.org/r/183040
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I123d559f9e398c40017a3b53875f9045f4eb52f4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to