if ( isset( $prop['isfilematch'] ) ) {
$vals['isfilematch'] = $result->isFileMatch();
}
+
+ if ( isset( $prop['extensiondata'] ) ) {
+ $extra = $result->getExtensionData();
+ // Add augmented data to the result. The data would be organized as a map:
+ // augmentorName => data
+ if ( $extra ) {
+ $vals['extensiondata'] = ApiResult::addMetadataToResultVars( $extra );
+ }
+ }
+
return $vals;
}
'categorysnippet',
'score', // deprecated
'hasrelated', // deprecated
+ 'extensiondata',
],
ApiBase::PARAM_ISMULTI => true,
ApiBase::PARAM_HELP_MSG_PER_VALUE => [],
"apihelp-query+search-paramvalue-prop-sectiontitle": "Adds the title of the matching section.",
"apihelp-query+search-paramvalue-prop-categorysnippet": "Adds a parsed snippet of the matching category.",
"apihelp-query+search-paramvalue-prop-isfilematch": "Adds a boolean indicating if the search matched file content.",
+ "apihelp-query+search-paramvalue-prop-extensiondata": "Adds extra data generated by extensions.",
"apihelp-query+search-paramvalue-prop-score": "Ignored.",
"apihelp-query+search-paramvalue-prop-hasrelated": "Ignored.",
"apihelp-query+search-param-limit": "How many total pages to return.",
"apihelp-query+search-paramvalue-prop-sectiontitle": "{{doc-apihelp-paramvalue|query+search|prop|sectiontitle}}",
"apihelp-query+search-paramvalue-prop-categorysnippet": "{{doc-apihelp-paramvalue|query+search|prop|categorysnippet}}",
"apihelp-query+search-paramvalue-prop-isfilematch": "{{doc-apihelp-paramvalue|query+search|prop|isfilematch}}",
+ "apihelp-query+search-paramvalue-prop-extensiondata": "{{doc-apihelp-paramvalue|query+search|prop|extensiondata}}",
"apihelp-query+search-paramvalue-prop-score": "{{doc-apihelp-paramvalue|query+search|prop|score}}\n{{Identical|Ignored}}",
"apihelp-query+search-paramvalue-prop-hasrelated": "{{doc-apihelp-paramvalue|query+search|prop|hasrelated}}\n{{Identical|Ignored}}",
"apihelp-query+search-param-limit": "{{doc-apihelp-param|query+search|limit}}",