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

Change subject: Remove an old hack
......................................................................


Remove an old hack

This hack fixed a bug we don't have any more so it can go.

Change-Id: I0308561713c364b28e61cba1d779bd7fb17cc753
---
M includes/Search/Result.php
1 file changed, 0 insertions(+), 17 deletions(-)

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



diff --git a/includes/Search/Result.php b/includes/Search/Result.php
index add5b64..04144ce 100644
--- a/includes/Search/Result.php
+++ b/includes/Search/Result.php
@@ -59,9 +59,6 @@
                $this->byteSize = $result->text_bytes;
                $this->timestamp = new MWTimestamp( $result->timestamp );
                $highlights = $result->getHighlights();
-               // TODO remove when Elasticsearch issue 3757 is fixed
-               $highlights = $this->swapInPlainHighlighting( $highlights, 
'redirect.title' );
-               $highlights = $this->swapInPlainHighlighting( $highlights, 
'heading' );
                if ( isset( $highlights[ 'title' ] ) ) {
                        $nstext = $this->getTitle()->getNamespace() === 0 ? '' :
                                Util::getNamespaceText( $this->getTitle() ) . 
':';
@@ -129,20 +126,6 @@
         */
        public function isMissingRevision() {
                return !$this->mTitle->isKnown();
-       }
-
-       /**
-        * Swap plain highlighting into the highlighting field if there isn't 
any normal highlighting.
-        * TODO remove when Elasticsearch issue 3757 is fixed.
-        * @var $highlights array of highlighting results
-        * @var $name string normal field name
-        * @return $highlights with $name replaced with plain field results if 
$name isn't in $highlights
-        */
-       private function swapInPlainHighlighting( $highlights, $name ) {
-               if ( !isset( $highlights[ $name ] ) && isset( $highlights[ 
"$name.plain" ] ) ) {
-                       $highlights[ $name ] = $highlights[ "$name.plain" ];
-               }
-               return $highlights;
        }
 
        /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0308561713c364b28e61cba1d779bd7fb17cc753
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Manybubbles <[email protected]>
Gerrit-Reviewer: Chad <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to