function update( $pageid, $title, $text ) {
## We don't want to index older revisions
- $sql = "UPDATE pagecontent SET textvector = NULL WHERE old_id IN " .
+ $sql = "UPDATE pagecontent SET textvector = NULL WHERE textvector IS NOT NULL and old_id IN " .
"(SELECT rev_text_id FROM revision WHERE rev_page = " . intval( $pageid ) .
" ORDER BY rev_text_id DESC OFFSET 1)";
$this->db->query( $sql );
* @ingroup Search
*/
class PostgresSearchResultSet extends SqlSearchResultSet {
- function __construct( $resultSet, $terms ) {
- parent::__construct( $resultSet, $terms );
- }
-
function next() {
- $row = $this->mResultSet->fetchObject();
+ $row = $this->resultSet->fetchObject();
if ( $row === false ) {
return false;
} else {