dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de19335
)
De-duplicate near match query terms when generating variants
author
nomoa
<nomoa@laposte.net>
Tue, 12 Jan 2016 01:22:25 +0000
(17:22 -0800)
committer
dcausse
<dcausse@wikimedia.org>
Tue, 12 Jan 2016 01:33:00 +0000
(17:33 -0800)
zhwiki generates 9 variants: we should not run these queries if the term is unchanged.
Change-Id: If23d19761dea33bf4bdcf6495becc8e983915fde
includes/search/SearchEngine.php
patch
|
blob
|
history
diff --git
a/includes/search/SearchEngine.php
b/includes/search/SearchEngine.php
index
e5ed23f
..
3c8d56e
100644
(file)
--- a/
includes/search/SearchEngine.php
+++ b/
includes/search/SearchEngine.php
@@
-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;