jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/397855 )
Change subject: [cirrus] tune wikidata similarity configuration
......................................................................
[cirrus] tune wikidata similarity configuration
Bug: T182293
Change-Id: I8fd10cead1116363c1e3a2f4be48916498109639
---
M wmf-config/InitialiseSettings.php
M wmf-config/Wikibase.php
2 files changed, 39 insertions(+), 0 deletions(-)
Approvals:
Smalyshev: Looks good to me, but someone else must approve
jenkins-bot: Verified
DCausse: Looks good to me, approved
Zoranzoki21: Looks good to me, but someone else must approve
diff --git a/wmf-config/InitialiseSettings.php
b/wmf-config/InitialiseSettings.php
index c61f97b..23f48b0 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -18291,6 +18291,9 @@
"jv" => "default",
"zh-min-nan" => "default", // needs to support deprecated language code
(e.g. zh_min_nanwikisource)
"nan" => "default", // e.g. zh_min_nan
+ // Currently defined in Wikibase.php
+ "wikidata" => "wikibase_similarity",
+ "testwikidata" => "wikibase_similarity",
],
'wmgCirrusSearchRescoreProfile' => [
diff --git a/wmf-config/Wikibase.php b/wmf-config/Wikibase.php
index f4e8b3a..25ae2f2 100644
--- a/wmf-config/Wikibase.php
+++ b/wmf-config/Wikibase.php
@@ -207,6 +207,42 @@
'uk' => [ 'index' => true, 'query' => true ],
'zh' => [ 'index' => true, 'query' => true ],
];
+
+ if ( is_array( $wgCirrusSearchSimilarityProfiles ) ) {
+ // TODO: have proper profile management in cirrus
+ $wgCirrusSearchSimilarityProfiles['wikibase_similarity'] = [
+ 'similarity' => [
+ 'default' => [
+ 'type' => 'BM25',
+ ],
+ 'descriptions' => [
+ 'type' => 'BM25',
+ ],
+ // This is a bit verbose to redefine always the
same settings
+ // but the advantage is that you can re-tune
and specialize
+ // these on an existing index (requires closing
the index).
+ // "labels" here means the label + aliases
+ 'labels' => [
+ 'type' => 'BM25',
+ 'k1' => 1.2,
+ 'b' => 0.3,
+ ],
+ // We consider all as being very similar to an
array field
+ // as it is a simple concatenation of all the
item data
+ 'all' => [
+ 'type' => 'BM25',
+ 'k1' => 1.2,
+ 'b' => 0.3,
+ ]
+ ],
+ 'fields' => [
+ '__default__' => 'default',
+ 'labels' => 'labels',
+ 'descriptions' => 'descriptions',
+ 'all' => 'all',
+ ]
+ ];
+ }
}
if ( $wmgUseWikibaseClient ) {
--
To view, visit https://gerrit.wikimedia.org/r/397855
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I8fd10cead1116363c1e3a2f4be48916498109639
Gerrit-PatchSet: 4
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: DCausse <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: DCausse <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Smalyshev <[email protected]>
Gerrit-Reviewer: Urbanecm <[email protected]>
Gerrit-Reviewer: Zoranzoki21 <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits