Chad has uploaded a new change for review.
https://gerrit.wikimedia.org/r/112037
Change subject: Make InterwikiResultsType implement instead of inherit
......................................................................
Make InterwikiResultsType implement instead of inherit
Follows up ff4fa34: now that TitleResultsType actually has
highlighting configuration we don't want to inherit that.
The only thing we were left inheriting were the fields so
just implement everything so we're future proof to changes
to title result types.
Change-Id: I3f1fc23e204ddda56e9accb4569558d09bc116d0
---
M includes/ResultsType.php
1 file changed, 10 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch
refs/changes/37/112037/1
diff --git a/includes/ResultsType.php b/includes/ResultsType.php
index 8781e85..6916369 100644
--- a/includes/ResultsType.php
+++ b/includes/ResultsType.php
@@ -46,6 +46,7 @@
public function getFields() {
return array( 'namespace', 'title' );
}
+
public function getHighlightingConfiguration() {
// This is similar to the FullTextResults type but against the
near_match and
// with the plain highlighter. Near match because that is how
the field is
@@ -176,7 +177,7 @@
}
}
-class InterwikiResultsType extends TitleResultsType {
+class InterwikiResultsType implements ResultsType {
/**
* @var array interwiki prefix mappings
*/
@@ -192,4 +193,12 @@
public function transformElasticsearchResult( $suggestPrefixes,
$suggestSuffixes, $result, $searchContainedSyntax ) {
return new ResultSet( $suggestPrefixes, $suggestSuffixes,
$result, $searchContainedSyntax, $this->prefixes );
}
+
+ public function getHighlightingConfiguration() {
+ return null;
+ }
+
+ public function getFields() {
+ return array( 'namespace', 'title' );
+ }
}
--
To view, visit https://gerrit.wikimedia.org/r/112037
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3f1fc23e204ddda56e9accb4569558d09bc116d0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Chad <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits