+ $apiResult->addValue( array( 'query', 'searchinfo' ),
+ 'suggestionsnippet', $matches->getSuggestionSnippet() );
+ }
+ if ( isset( $searchInfo['rewrittenquery'] ) && $matches->hasRewrittenQuery() ) {
+ $apiResult->addValue( array( 'query', 'searchinfo' ),
+ 'rewrittenquery', $matches->getQueryAfterRewrite() );
+ $apiResult->addValue( array( 'query', 'searchinfo' ),
+ 'rewrittenquerysnippet', $matches->getQueryAfterRewriteSnippet() );