jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/350492 )
Change subject: Align other index template boosting config names
......................................................................
Align other index template boosting config names
The documentation and CirrusSearch.php referred to this by
one name, but the code and tests used another name. Align things
by using the same config name throughout.
Change-Id: I08a88e7f0a3f49e259b2ae8a01d5dc42f5613a24
(cherry picked from commit 60ef063b1dd4851598f9cfa54a8ff1fbd5fad48a)
---
M includes/Searcher.php
M tests/unit/SearcherTest.php
M tests/unit/fixtures/searchText/boost_templates_other_index_001.query
3 files changed, 3 insertions(+), 3 deletions(-)
Approvals:
Niharika29: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/Searcher.php b/includes/Searcher.php
index 13314f1..19b8f8b 100644
--- a/includes/Searcher.php
+++ b/includes/Searcher.php
@@ -528,7 +528,7 @@
$extraIndexes = $this->getAndFilterExtraIndexes();
$this->searchContext->addFilter( new
\Elastica\Query\Terms( 'namespace', $namespaces ) );
foreach ( $extraIndexes as $extraIndex ) {
- $extraIndexBoosts = $this->config->getElement(
'CirrusSearchExtraIndexTemplateBoosts', $extraIndex );
+ $extraIndexBoosts = $this->config->getElement(
'CirrusSearchExtraIndexBoostTemplates', $extraIndex );
if ( isset( $extraIndexBoosts['wiki'],
$extraIndexBoosts['boosts'] ) ) {
$this->searchContext->addExtraIndexBoostTemplates(
$extraIndexBoosts['wiki'],
diff --git a/tests/unit/SearcherTest.php b/tests/unit/SearcherTest.php
index 1663aea..f1f37de 100644
--- a/tests/unit/SearcherTest.php
+++ b/tests/unit/SearcherTest.php
@@ -60,7 +60,7 @@
],
'wgCirrusSearchQueryStringMaxDeterminizedStates' => 500,
'wgCirrusSearchExtraIndexes' => [],
- 'wgCirrusSearchExtraIndexTemplateBoosts' => [],
+ 'wgCirrusSearchExtraIndexBoostTemplates' => [],
'wgContentNamespaces' => [ NS_MAIN ],
// Override the list of namespaces to give more
deterministic results
'wgHooks' => [
diff --git
a/tests/unit/fixtures/searchText/boost_templates_other_index_001.query
b/tests/unit/fixtures/searchText/boost_templates_other_index_001.query
index d05af4c..88c9c9a 100644
--- a/tests/unit/fixtures/searchText/boost_templates_other_index_001.query
+++ b/tests/unit/fixtures/searchText/boost_templates_other_index_001.query
@@ -1,7 +1,7 @@
{
"query": "main",
"config": {
- "wgCirrusSearchExtraIndexTemplateBoosts": {
+ "wgCirrusSearchExtraIndexBoostTemplates": {
"foowiki": {
"wiki": "foo",
"boosts": {
--
To view, visit https://gerrit.wikimedia.org/r/350492
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I08a88e7f0a3f49e259b2ae8a01d5dc42f5613a24
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: wmf/1.29.0-wmf.21
Gerrit-Owner: EBernhardson <[email protected]>
Gerrit-Reviewer: Niharika29 <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits