[Rt-commit] r19112 - rt/3.999/branches/FTS/sbin

ruz at bestpractical.com ruz at bestpractical.com
Thu Apr 9 10:18:33 EDT 2009


Author: ruz
Date: Thu Apr  9 10:18:33 2009
New Revision: 19112

Modified:
   rt/3.999/branches/FTS/sbin/rt-setup-fulltext-index

Log:
* extend select a little bit to search only attachments of tickets
  and only of those that are not deleted

Modified: rt/3.999/branches/FTS/sbin/rt-setup-fulltext-index
==============================================================================
--- rt/3.999/branches/FTS/sbin/rt-setup-fulltext-index	(original)
+++ rt/3.999/branches/FTS/sbin/rt-setup-fulltext-index	Thu Apr  9 10:18:33 2009
@@ -142,8 +142,10 @@
     sql_pass        = $sphinx_conf{'pass'}
 
     sql_query       = \
-        SELECT id, content FROM Attachments \
-        WHERE content_type = 'text/plain'
+        SELECT a.id, a.content FROM Attachments a
+        JOIN Transactions txn ON a.transaction_id = txn.id AND txn.object_type = 'RT::Model::Ticket' \
+        JOIN Tickets t ON txn.object_id = t.id \
+        WHERE a.content_type = 'text/plain' AND t.Status != 'deleted'
 
     sql_query_info  = SELECT * FROM Attachments WHERE id=$id
 }


More information about the Rt-commit mailing list