of queueing style modules as well.
* OutputPage::addModuleScripts() and ParserOutput::addModuleScripts are
deprecated. Use addModules() instead.
+* Overriding SearchEngine::{searchText,searchTitle,searchArchiveTitle}
+ in extending classes is deprecated. Extend related doSearch* methods
+ instead.
=== Other changes in 1.32 ===
* …
/**
* Perform a full text search query and return a result set.
* If full text searches are not supported or disabled, return null.
- * STUB
+ *
+ * As of 1.32 overriding this function is deprecated. It will
+ * be converted to final in 1.34. Override self::doSearchText().
+ *
+ * @param string $term Raw search term
+ * @return SearchResultSet|Status|null
+ */
+ public function searchText( $term ) {
+ return $this->doSearchText( $term );
+ }
+
+ /**
+ * Perform a full text search query and return a result set.
*
* @param string $term Raw search term
* @return SearchResultSet|Status|null
+ * @since 1.32
*/
- function searchText( $term ) {
+ protected function doSearchText( $term ) {
return null;
}
* The results returned by this methods are only sugegstions and
* may not end up being shown to the user.
*
+ * As of 1.32 overriding this function is deprecated. It will
+ * be converted to final in 1.34. Override self::doSearchArchiveTitle().
+ *
* @param string $term Raw search term
* @return Status<Title[]>
* @since 1.29
*/
- function searchArchiveTitle( $term ) {
+ public function searchArchiveTitle( $term ) {
+ return $this->doSearchArchiveTitle( $term );
+ }
+
+ /**
+ * Perform a title search in the article archive.
+ *
+ * @param string $term Raw search term
+ * @return Status<Title[]>
+ * @since 1.32
+ */
+ protected function doSearchArchiveTitle( $term ) {
return Status::newGood( [] );
}
* If title searches are not supported or disabled, return null.
* STUB
*
+ * As of 1.32 overriding this function is deprecated. It will
+ * be converted to final in 1.34. Override self::doSearchTitle().
+ *
+ * @param string $term Raw search term
+ * @return SearchResultSet|null
+ */
+ public function searchTitle( $term ) {
+ return $this->doSearchTitle( $term );
+ }
+
+ /**
+ * Perform a title-only search query and return a result set.
+ *
* @param string $term Raw search term
* @return SearchResultSet|null
+ * @since 1.32
*/
- function searchTitle( $term ) {
+ protected function doSearchTitle( $term ) {
return null;
}
*
* @param string $term Raw search term
* @return SqlSearchResultSet
- * @access public
*/
- function searchText( $term ) {
+ protected function doSearchText( $term ) {
$resultSet = $this->db->query( $this->getQuery( $this->filter( $term ), true ) );
return new SqlSearchResultSet( $resultSet, $this->searchTerms );
}
*
* @param string $term Raw search term
* @return SqlSearchResultSet
- * @access public
*/
- function searchTitle( $term ) {
+ protected function doSearchTitle( $term ) {
$resultSet = $this->db->query( $this->getQuery( $this->filter( $term ), false ) );
return new SqlSearchResultSet( $resultSet, $this->searchTerms );
}
* @param string $term Raw search term
* @return SqlSearchResultSet
*/
- function searchText( $term ) {
+ protected function doSearchText( $term ) {
return $this->searchInternal( $term, true );
}
* @param string $term Raw search term
* @return SqlSearchResultSet
*/
- function searchTitle( $term ) {
+ protected function doSearchTitle( $term ) {
return $this->searchInternal( $term, false );
}
* @param string $term Raw search term
* @return SqlSearchResultSet
*/
- function searchText( $term ) {
+ protected function doSearchText( $term ) {
if ( $term == '' ) {
return new SqlSearchResultSet( false, '' );
}
* @param string $term Raw search term
* @return SqlSearchResultSet
*/
- function searchTitle( $term ) {
+ protected function doSearchTitle( $term ) {
if ( $term == '' ) {
return new SqlSearchResultSet( false, '' );
}
* @param string $term Raw search term
* @return SqlSearchResultSet
*/
- function searchTitle( $term ) {
+ protected function doSearchTitle( $term ) {
$q = $this->searchQuery( $term, 'titlevector', 'page_title' );
$olderror = error_reporting( E_ERROR );
$resultSet = $this->db->query( $q, 'SearchPostgres', true );
return new SqlSearchResultSet( $resultSet, $this->searchTerms );
}
- function searchText( $term ) {
+ protected function doSearchText( $term ) {
$q = $this->searchQuery( $term, 'textvector', 'old_text' );
$olderror = error_reporting( E_ERROR );
$resultSet = $this->db->query( $q, 'SearchPostgres', true );
* Fetches next search result, or false.
* STUB
* FIXME: refactor as iterator, so we could use nicer interfaces.
+ * @deprecated since 1.32; Use self::extractResults()
* @return SearchResult|false
*/
function next() {
/**
* Rewind result set back to beginning
+ * @deprecated since 1.32; Use self::extractResults()
*/
function rewind() {
}
* @param string $term Raw search term
* @return SqlSearchResultSet
*/
- function searchText( $term ) {
+ protected function doSearchText( $term ) {
return $this->searchInternal( $term, true );
}
* @param string $term Raw search term
* @return SqlSearchResultSet
*/
- function searchTitle( $term ) {
+ protected function doSearchTitle( $term ) {
return $this->searchInternal( $term, false );
}