When a page is updated under PostgreSQL, there is code to de-index all but the most recent version of the page. But when a page is moved, it was accidentally de-indexing the most recent version as well, because rev_text_id is not incremented in that case. A simple tweak to the SQL fixes that. I added code to the update script to find pages previously corrupted by this problem and reindex them. Bug: 66650 Change-Id: I52e1bbbd8592be5e7c7383c225e6b4c19bbe5b9e
5 lines
239 B
SQL
5 lines
239 B
SQL
UPDATE /*_*/pagecontent SET textvector=to_tsvector(old_text)
|
|
WHERE textvector IS NULL AND old_id IN
|
|
(SELECT max(rev_text_id) FROM revision GROUP BY rev_page);
|
|
|
|
INSERT INTO /*_*/updatelog(ul_key) VALUES ('patch-textsearch_bug66650.sql');
|