Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-search.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-search.sql,v
diff -u -N -r1.9 -r1.9.2.1
--- openacs-4/packages/acs-content-repository/sql/postgresql/content-search.sql	7 Jul 2011 10:46:02 -0000	1.9
+++ openacs-4/packages/acs-content-repository/sql/postgresql/content-search.sql	24 Feb 2015 08:12:40 -0000	1.9.2.1
@@ -138,7 +138,7 @@
     if old.live_revision is not null and old.live_revision <> coalesce(new.live_revision,0) then
         perform search_observer__enqueue(old.live_revision,'DELETE');
     end if;
-    if new.publish_status = 'expired' then
+    if old.live_revision is not null and new.publish_status = 'expired' then
         perform search_observer__enqueue(old.live_revision,'DELETE');
     end if;
 
