[sup-talk] Delete A Source From Ferret Index

Jonathan Lassoff jof at thejof.com
Mon Jan 4 21:21:34 EST 2010


Excerpts from Jonathan Lassoff's message of Sun Jan 03 19:35:08 -0800 2010:
> Any suggestions for removing all messages from the index that belong to
> a certain source?

A solution that ended up working for me:

 - Start the devel console (cd ~/src/sup; ./devel/console.sh)
 - Search for message ids from the source you want to remove and run
   Redwood::FerretIndex#delete on each (the evil source id was 10 in my case):
  ">> Index.each_id(Index.parse_query("source_id:10")){|m| Index.delete(m)}; Index.save_index"

Cheers,
jonathan


More information about the sup-talk mailing list