EBernhardson has uploaded a new change for review.

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

Change subject: finish renaming of indexType -> indexTypeName
......................................................................

finish renaming of indexType -> indexTypeName

It looks like the indexType property was renamed to indexTypeName
but a couple of spots were missed. This causes errors when trying
to build an index when $wgCirrusSearchReplicas contains an array.

Change-Id: I119d6ad2d150868d5a516bf9de99856352044fc2
---
M maintenance/updateSuggesterIndex.php
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/maintenance/updateSuggesterIndex.php 
b/maintenance/updateSuggesterIndex.php
index 106cbd2..a186de1 100644
--- a/maintenance/updateSuggesterIndex.php
+++ b/maintenance/updateSuggesterIndex.php
@@ -308,8 +308,8 @@
 
                // If $wgCirrusSearchReplicas is an array of index type to 
number of replicas then respect that
                if ( is_array( $wgCirrusSearchReplicas ) ) {
-                       if ( isset( $wgCirrusSearchReplicas[ $this->indexType ] 
) ) {
-                               return $wgCirrusSearchReplicas[ 
$this->indexType ];
+                       if ( isset( $wgCirrusSearchReplicas[ 
$this->indexTypeName ] ) ) {
+                               return $wgCirrusSearchReplicas[ 
$this->indexTypeName ];
                        } else {
                                $this->error( 'If wgCirrusSearchReplicas is an 
array it must contain all index types.', 1 );
                        }
@@ -340,7 +340,7 @@
        private function getShardCount() {
                global $wgCirrusSearchShardCount;
                if ( !isset( $wgCirrusSearchShardCount[ $this->indexTypeName ] 
) ) {
-                       $this->error( 'Could not find a shard count for ' . 
$this->indexType . '.  Did you add an index to ' .
+                       $this->error( 'Could not find a shard count for ' . 
$this->indexTypeName . '.  Did you add an index to ' .
                                '$wgCirrusSearchNamespaceMappings but forget to 
add it to $wgCirrusSearchShardCount?', 1 );
                }
                return $wgCirrusSearchShardCount[ $this->indexTypeName ];
@@ -378,7 +378,7 @@
                $validators[] = new 
\CirrusSearch\Maintenance\Validators\NumberOfShardsValidator( 
$this->getIndex(), $this->getShardCount(), $this );
                $validators[] = new 
\CirrusSearch\Maintenance\Validators\ReplicaRangeValidator( $this->getIndex(), 
$this->getReplicaCount(), $this );
                $validators[] = $this->getShardAllocationValidator();
-               $validators[] = new 
\CirrusSearch\Maintenance\Validators\MaxShardsPerNodeValidator( 
$this->getIndex(), $this->indexType, $this->maxShardsPerNode, $this );
+               $validators[] = new 
\CirrusSearch\Maintenance\Validators\MaxShardsPerNodeValidator( 
$this->getIndex(), $this->indexTypeName, $this->maxShardsPerNode, $this );
                return $validators;
        }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I119d6ad2d150868d5a516bf9de99856352044fc2
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