$searchInfo = array_flip( $params['info'] );
$prop = array_flip( $params['prop'] );
- // Deprecated parameters
- if ( isset( $prop['hasrelated'] ) ) {
- $this->addDeprecation(
- [ 'apiwarn-deprecation-parameter', 'srprop=hasrelated' ], 'action=search&srprop=hasrelated'
- );
- }
- if ( isset( $prop['score'] ) ) {
- $this->addDeprecation(
- [ 'apiwarn-deprecation-parameter', 'srprop=score' ], 'action=search&srprop=score'
- );
- }
-
// Create search engine instance and set options
$search = $this->buildSearchEngine( $params );
$search->setFeatureData( 'rewrite', (bool)$params['enablerewrites'] );
$title = $result->getTitle();
ApiQueryBase::addTitleInfo( $vals, $title );
+ $vals['pageid'] = $title->getArticleID();
if ( isset( $prop['size'] ) ) {
$vals['size'] = $result->getByteSize();
],
ApiBase::PARAM_ISMULTI => true,
ApiBase::PARAM_HELP_MSG_PER_VALUE => [],
+ ApiBase::PARAM_DEPRECATED_VALUES => [
+ 'score' => true,
+ 'hasrelated' => true
+ ],
],
'interwiki' => false,
'enablerewrites' => false,