Index: trunk/extensions/MWSearch/MWSearch_body.php |
— | — | @@ -435,11 +435,18 @@ |
436 | 436 | global $wgLuceneSearchVersion, $wgLuceneSearchCacheExpiry; |
437 | 437 | global $wgLuceneSearchTimeout; |
438 | 438 | |
439 | | - if( is_array( $wgLuceneHost ) ) { |
440 | | - $pick = mt_rand( 0, count( $wgLuceneHost ) - 1 ); |
441 | | - $host = $wgLuceneHost[$pick]; |
| 439 | + $hosts = $wgLuceneHost; |
| 440 | + if( $method == 'prefix'){ |
| 441 | + global $wgLucenePrefixHost; |
| 442 | + if( isset($wgLucenePrefixHost) ) |
| 443 | + $hosts = $wgLucenePrefixHost; |
| 444 | + } |
| 445 | + |
| 446 | + if( is_array( $hosts ) ) { |
| 447 | + $pick = mt_rand( 0, count( $hosts ) - 1 ); |
| 448 | + $host = $hosts[$pick]; |
442 | 449 | } else { |
443 | | - $host = $wgLuceneHost; |
| 450 | + $host = $hosts; |
444 | 451 | } |
445 | 452 | |
446 | 453 | $enctext = rawurlencode( trim( $query ) ); |