Merge "De-duplicate near match query terms when generating variants"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 12 Jan 2016 16:56:30 +0000 (16:56 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 12 Jan 2016 16:56:30 +0000 (16:56 +0000)
includes/search/SearchEngine.php

index e5ed23f..3c8d56e 100644 (file)
@@ -164,10 +164,10 @@ class SearchEngine {
                $allSearchTerms = array( $searchterm );
 
                if ( $wgContLang->hasVariants() ) {
-                       $allSearchTerms = array_merge(
+                       $allSearchTerms = array_unique( array_merge(
                                $allSearchTerms,
                                $wgContLang->autoConvertToAllVariants( $searchterm )
-                       );
+                       ) );
                }
 
                $titleResult = null;