jenkins-bot has submitted this change and it was merged.
Change subject: Added justMapping option to updateOneSearchIndexConfig
......................................................................
Added justMapping option to updateOneSearchIndexConfig
This option allows admins to update the mapping only.
This should be only used in very specific case (e.g a new field has been
added by an extension).
Bug: T116185
Change-Id: I78b19ce7de546a512f8c0475bc1b59c248ca89da
(cherry picked from commit 016bfe45509368fa6811d794ed713f053119a00f)
---
M maintenance/updateOneSearchIndexConfig.php
1 file changed, 6 insertions(+), 0 deletions(-)
Approvals:
Aude: Looks good to me, approved
jenkins-bot: Verified
diff --git a/maintenance/updateOneSearchIndexConfig.php
b/maintenance/updateOneSearchIndexConfig.php
index 0b476dd..5544d3d 100644
--- a/maintenance/updateOneSearchIndexConfig.php
+++ b/maintenance/updateOneSearchIndexConfig.php
@@ -163,6 +163,7 @@
$maintenance->addOption( 'justAllocation', 'Just validate the
shard allocation settings. Use ' .
"when you need to apply new cache warmers but want to
be sure that you won't apply any other " .
'changes at an inopportune time.' );
+ $maintenance->addOption( 'justMapping', 'Just try to update the
mapping.' );
}
public function execute() {
@@ -221,6 +222,11 @@
return;
}
+ if ( $this->getOption( 'justMapping', false ) ) {
+ $this->validateMapping();
+ return;
+ }
+
$this->indexIdentifier =
$utils->pickIndexIdentifierFromOption( $this->getOption( 'indexIdentifier',
'current' ), $this->getIndexTypeName() );
$this->analysisConfigBuilder = $this->pickAnalyzer(
$this->langCode, $this->availablePlugins );
$this->validateIndex();
--
To view, visit https://gerrit.wikimedia.org/r/248862
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I78b19ce7de546a512f8c0475bc1b59c248ca89da
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: wmf/1.27.0-wmf.3
Gerrit-Owner: Aude <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Chad <[email protected]>
Gerrit-Reviewer: DCausse <[email protected]>
Gerrit-Reviewer: Manybubbles <[email protected]>
Gerrit-Reviewer: Smalyshev <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits