jenkins-bot has submitted this change and it was merged.

Change subject: Improve comments on fields and fix opening_text - needs no 
highlights.
......................................................................


Improve comments on fields and fix opening_text - needs no highlights.

Change-Id: Iad6876aae109ad84c5534619f47c72edc900d704
---
M includes/content/WikitextContentHandler.php
M includes/search/SearchIndexField.php
2 files changed, 6 insertions(+), 3 deletions(-)

Approvals:
  EBernhardson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/content/WikitextContentHandler.php 
b/includes/content/WikitextContentHandler.php
index 86f0d50..4e8f0df 100644
--- a/includes/content/WikitextContentHandler.php
+++ b/includes/content/WikitextContentHandler.php
@@ -127,7 +127,8 @@
 
                $fields['opening_text'] =
                        $engine->makeSearchFieldMapping( 'opening_text', 
SearchIndexField::INDEX_TYPE_TEXT );
-               $fields['opening_text']->setFlag( 
SearchIndexField::FLAG_SCORING );
+               $fields['opening_text']->setFlag( 
SearchIndexField::FLAG_SCORING |
+                                                 
SearchIndexField::FLAG_NO_HIGHLIGHT );
 
                $fields['outgoing_link'] =
                        $engine->makeSearchFieldMapping( 'outgoing_link', 
SearchIndexField::INDEX_TYPE_KEYWORD );
diff --git a/includes/search/SearchIndexField.php 
b/includes/search/SearchIndexField.php
index 2ea255f..7499853 100644
--- a/includes/search/SearchIndexField.php
+++ b/includes/search/SearchIndexField.php
@@ -22,7 +22,9 @@
         */
        const FLAG_CASEFOLD = 1;
        /**
-        * This field is for scoring only.
+        * This field contains secondary information, which is
+        * already present in other fields, but can be used for
+        * scoring.
         */
        const FLAG_SCORING = 2;
        /**
@@ -30,7 +32,7 @@
         */
        const FLAG_NO_HIGHLIGHT = 4;
        /**
-        * Do not index this field.
+        * Do not index this field, just store it.
         */
        const FLAG_NO_INDEX = 8;
        /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iad6876aae109ad84c5534619f47c72edc900d704
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Smalyshev <[email protected]>
Gerrit-Reviewer: DCausse <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>
Gerrit-Reviewer: Jackmcbarn <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to