EBernhardson has uploaded a new change for review.

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

Change subject: Add missing properties and methods to updateSuggesterIndex
......................................................................

Add missing properties and methods to updateSuggesterIndex

There were a few undefined properties we just magic into place, and
one method that somehow doesn't exist. Not sure how we havn't hit
an undefined method warning there yet...

Bug: T132625
Change-Id: If24f72e514535190369958dde6323d340ad88ea6
---
M maintenance/updateSuggesterIndex.php
1 file changed, 28 insertions(+), 2 deletions(-)


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

diff --git a/maintenance/updateSuggesterIndex.php 
b/maintenance/updateSuggesterIndex.php
index 4a27003..3f83ab5 100644
--- a/maintenance/updateSuggesterIndex.php
+++ b/maintenance/updateSuggesterIndex.php
@@ -8,8 +8,10 @@
 use CirrusSearch\Util;
 use CirrusSearch\BuildDocument\SuggestBuilder;
 use CirrusSearch\BuildDocument\SuggestScoringMethodFactory;
+use CirrusSearch\BuildDocument\SuggestScoringMethod;
 use CirrusSearch\Maintenance\Validators\AnalyzersValidator;
 use Elastica;
+use Elastica\Index;
 use Elastica\Query;
 use Elastica\Request;
 use Elastica\Status;
@@ -78,7 +80,7 @@
        private $scoreMethod;
 
        /**
-        * @var old suggester index that will be deleted at the end of the 
process
+        * @var Index old suggester index that will be deleted at the end of 
the process
         */
        private $oldIndex;
 
@@ -124,6 +126,21 @@
         */
        public $builder;
 
+       /**
+        * @var AnalysisConfigBuilder
+        */
+       private $analysisConfigBuilder;
+
+       /**
+        * @var bool
+        */
+       private $recycle = false;
+
+       /**
+        * @var string[]
+        */
+       private $bannedPlugins;
+
        public function __construct() {
                parent::__construct();
                $this->addDescription( "Create a new suggester index. Always 
operates on a single cluster." );
@@ -157,7 +174,8 @@
                global $wgLanguageCode,
                        $wgCirrusSearchBannedPlugins,
                        $wgPoolCounterConf,
-                       $wgCirrusSearchMasterTimeout;
+                       $wgCirrusSearchMasterTimeout,
+                       $wgCirrusSearchMaxShardsPerNode;
 
                $this->masterTimeout = $this->getOption( 'masterTimeout', 
$wgCirrusSearchMasterTimeout );
                $this->indexTypeName = Connection::TITLE_SUGGEST_TYPE;
@@ -772,6 +790,14 @@
        }
 
        /**
+        * @return \CirrusSearch\Maintenance\Validators\ShardAllocationValidator
+        */
+       private function getShardAllocationValidator() {
+               global $wgCirrusSearchIndexAllocation;
+               return new 
\CirrusSearch\Maintenance\Validators\ShardAllocationValidator( 
$this->getIndex(), $wgCirrusSearchIndexAllocation, $this );
+       }
+
+       /**
         * @return \Elastica\Index being updated
         */
        public function getIndex() {

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

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

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

Reply via email to