EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/305583
Change subject: Auto-populate the wiki field when reindexing ...................................................................... Auto-populate the wiki field when reindexing This field was recently added, but for an existing index will take quite some time to naturally be populated in 100% of pages by the normal update process. Instead of waiting and hoping populate it on demand during an in-place reindex. Change-Id: I5cdb77b171222601d5e45438ef9d12f52ac42364 --- M includes/Maintenance/Reindexer.php 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/83/305583/1 diff --git a/includes/Maintenance/Reindexer.php b/includes/Maintenance/Reindexer.php index c22221c..ca08722 100644 --- a/includes/Maintenance/Reindexer.php +++ b/includes/Maintenance/Reindexer.php @@ -360,6 +360,12 @@ // out any old fields that we no longer use. $data = Util::cleanUnusedFields( $result->getSource(), $properties ); + // This field was added July, 2016. For the first reindex that occurs after it was added it will + // not exist in the documents, so add it here. + if ( !isset( $data['wiki'] ) ) { + $data['wiki'] = wfWikiId(); + } + // 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/305583 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5cdb77b171222601d5e45438ef9d12f52ac42364 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: EBernhardson <ebernhard...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits