DCausse has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/337572 )

Change subject: Explicitly use BM25 as default for wmf_defaults similarity 
profile
......................................................................

Explicitly use BM25 as default for wmf_defaults similarity profile

The 2.x -> 5.x conversion has some uncertainties aroung similarity
profiles and the 'default' similarity. To make things explicit and
easy to understand force BM25 as the type for wmf_defaults.

Specifically fields in 2.x that specify similarity as default will
report in 5.x that their similarity is classic. It appears though
that the actual search will still use BM25 (tested in 5.1.2, see
https://github.com/elastic/elasticsearch-migration/issues/103#issuecomment-279546227)
To ensure that _mapping doesn't report something wrong, and that
there arn't other lingering, undetected, bugs with this conversion,
we explicitly name BM25 as the similarity config.

Change-Id: I32ddeeb18ac93623ff16b3f9b895c925394e3944
(cherry picked from commit 22edc18abdb2f31d1fac76fdf59c4770f75266b9)
---
M profiles/SimilarityProfiles.php
1 file changed, 5 insertions(+), 2 deletions(-)


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

diff --git a/profiles/SimilarityProfiles.php b/profiles/SimilarityProfiles.php
index d3df73f..234deaf 100644
--- a/profiles/SimilarityProfiles.php
+++ b/profiles/SimilarityProfiles.php
@@ -26,7 +26,8 @@
  */
 
 $wgCirrusSearchSimilarityProfiles = [
-       // default profile, uses the classic TF/IDF from Lucene
+       // default profile, uses the classic TF/IDF from Lucene. With ES5
+       // this will become BM25.
        'default' => [],
        // BM25 with default values for k and a for all fields
        'bm25_with_defaults' => [
@@ -97,6 +98,8 @@
        'wmf_defaults' => [
                'similarity' => [
                        'default' => [
+                               // Although not referenced, this is necessary
+                               // to disable coord
                                'type' => 'BM25',
                        ],
                        'arrays' => [
@@ -106,7 +109,7 @@
                        ],
                ],
                'fields' => [
-                       '__default__' => 'default',
+                       '__default__' => 'BM25',
                        'category' => 'arrays',
                        'heading' => 'arrays',
                        'redirect.title' => 'arrays',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I32ddeeb18ac93623ff16b3f9b895c925394e3944
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: wmf/1.29.0-wmf.11
Gerrit-Owner: DCausse <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to