jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/363655 )
Change subject: Fix field name in entity search
......................................................................
Fix field name in entity search
Should be labels_all.near_match_folded
Bug: T125500
Change-Id: Ie5883a975bd001a78504269a3790223f806fbc74
---
M repo/includes/Search/Elastic/EntitySearchElastic.php
M repo/tests/phpunit/data/entitySearch/search_de-ch-en.expected
M repo/tests/phpunit/data/entitySearch/search_de-ch.expected
M repo/tests/phpunit/data/entitySearch/search_de-ch_strict.expected
M repo/tests/phpunit/data/entitySearch/search_en.expected
M repo/tests/phpunit/data/entitySearch/search_en_strict.expected
M repo/tests/phpunit/data/entitySearch/search_zh-de-ch.expected
M repo/tests/phpunit/data/entitySearch/search_zh.expected
8 files changed, 13 insertions(+), 13 deletions(-)
Approvals:
jenkins-bot: Verified
Thiemo Mättig (WMDE): Looks good to me, approved
diff --git a/repo/includes/Search/Elastic/EntitySearchElastic.php
b/repo/includes/Search/Elastic/EntitySearchElastic.php
index 2499534..90de5bf 100644
--- a/repo/includes/Search/Elastic/EntitySearchElastic.php
+++ b/repo/includes/Search/Elastic/EntitySearchElastic.php
@@ -164,7 +164,7 @@
$langChain = $this->languageChainFactory->newFromLanguageCode(
$languageCode );
$this->searchLanguageCodes =
$langChain->getFetchLanguageCodes();
if ( !$strictLanguage ) {
- $fields[] = "labels_all.near_match^{$profile['any']}";
+ $fields[] =
"labels_all.near_match_folded^{$profile['any']}";
$discount = 1;
foreach ( $this->searchLanguageCodes as $fallbackCode )
{
if ( $fallbackCode === $languageCode ) {
diff --git a/repo/tests/phpunit/data/entitySearch/search_de-ch-en.expected
b/repo/tests/phpunit/data/entitySearch/search_de-ch-en.expected
index f458654..8230968 100644
--- a/repo/tests/phpunit/data/entitySearch/search_de-ch-en.expected
+++ b/repo/tests/phpunit/data/entitySearch/search_de-ch-en.expected
@@ -26,7 +26,7 @@
"labels.de-ch.near_match^40",
"labels.de-ch.near_match_folded^30",
"labels.de-ch.prefix^15",
- "labels_all.near_match^1",
+ "labels_all.near_match_folded^1",
"labels.de.near_match^25",
"labels.de.near_match_folded^20",
"labels.de.prefix^10",
@@ -147,4 +147,4 @@
"options": {
"timeout": "20s"
}
-}
\ No newline at end of file
+}
diff --git a/repo/tests/phpunit/data/entitySearch/search_de-ch.expected
b/repo/tests/phpunit/data/entitySearch/search_de-ch.expected
index 4b15d63..bd3a853 100644
--- a/repo/tests/phpunit/data/entitySearch/search_de-ch.expected
+++ b/repo/tests/phpunit/data/entitySearch/search_de-ch.expected
@@ -26,7 +26,7 @@
"labels.de-ch.near_match^40",
"labels.de-ch.near_match_folded^30",
"labels.de-ch.prefix^15",
- "labels_all.near_match^1",
+ "labels_all.near_match_folded^1",
"labels.de.near_match^25",
"labels.de.near_match_folded^20",
"labels.de.prefix^10",
@@ -151,4 +151,4 @@
"options": {
"timeout": "20s"
}
-}
\ No newline at end of file
+}
diff --git a/repo/tests/phpunit/data/entitySearch/search_de-ch_strict.expected
b/repo/tests/phpunit/data/entitySearch/search_de-ch_strict.expected
index 2904cb2..b75b2d6 100644
--- a/repo/tests/phpunit/data/entitySearch/search_de-ch_strict.expected
+++ b/repo/tests/phpunit/data/entitySearch/search_de-ch_strict.expected
@@ -144,4 +144,4 @@
"options": {
"timeout": "20s"
}
-}
\ No newline at end of file
+}
diff --git a/repo/tests/phpunit/data/entitySearch/search_en.expected
b/repo/tests/phpunit/data/entitySearch/search_en.expected
index 3eddbce..5d7f639 100644
--- a/repo/tests/phpunit/data/entitySearch/search_en.expected
+++ b/repo/tests/phpunit/data/entitySearch/search_en.expected
@@ -26,7 +26,7 @@
"labels.en.near_match^40",
"labels.en.near_match_folded^30",
"labels.en.prefix^15",
- "labels_all.near_match^1"
+ "labels_all.near_match_folded^1"
]
}
}
@@ -125,4 +125,4 @@
"options": {
"timeout": "20s"
}
-}
\ No newline at end of file
+}
diff --git a/repo/tests/phpunit/data/entitySearch/search_en_strict.expected
b/repo/tests/phpunit/data/entitySearch/search_en_strict.expected
index c559aea..81c2ca3 100644
--- a/repo/tests/phpunit/data/entitySearch/search_en_strict.expected
+++ b/repo/tests/phpunit/data/entitySearch/search_en_strict.expected
@@ -124,4 +124,4 @@
"options": {
"timeout": "20s"
}
-}
\ No newline at end of file
+}
diff --git a/repo/tests/phpunit/data/entitySearch/search_zh-de-ch.expected
b/repo/tests/phpunit/data/entitySearch/search_zh-de-ch.expected
index 107549b..5516e22 100644
--- a/repo/tests/phpunit/data/entitySearch/search_zh-de-ch.expected
+++ b/repo/tests/phpunit/data/entitySearch/search_zh-de-ch.expected
@@ -26,7 +26,7 @@
"labels.zh.near_match^40",
"labels.zh.near_match_folded^30",
"labels.zh.prefix^15",
- "labels_all.near_match^1",
+ "labels_all.near_match_folded^1",
"labels.zh-hans.near_match^25",
"labels.zh-hans.near_match_folded^20",
"labels.zh-hans.prefix^10",
@@ -228,4 +228,4 @@
"options": {
"timeout": "20s"
}
-}
\ No newline at end of file
+}
diff --git a/repo/tests/phpunit/data/entitySearch/search_zh.expected
b/repo/tests/phpunit/data/entitySearch/search_zh.expected
index 4dcd008..1379194 100644
--- a/repo/tests/phpunit/data/entitySearch/search_zh.expected
+++ b/repo/tests/phpunit/data/entitySearch/search_zh.expected
@@ -26,7 +26,7 @@
"labels.zh.near_match^40",
"labels.zh.near_match_folded^30",
"labels.zh.prefix^15",
- "labels_all.near_match^1",
+ "labels_all.near_match_folded^1",
"labels.zh-hans.near_match^25",
"labels.zh-hans.near_match_folded^20",
"labels.zh-hans.prefix^10",
@@ -242,4 +242,4 @@
"options": {
"timeout": "20s"
}
-}
\ No newline at end of file
+}
--
To view, visit https://gerrit.wikimedia.org/r/363655
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie5883a975bd001a78504269a3790223f806fbc74
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Smalyshev <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: DCausse <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits