[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sup-talk] Delete A Source From Ferret Index



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
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk