db maintenance "delete oldest least used tokens, but maintain count of x"

Bill McClain wmcclain at salamander.com
Fri Mar 5 14:05:49 CET 2004


> On Thu, 04 Mar 2004, Chris Fortune wrote:
> 
> > Anybody have any ideas how to implement this db maintenance rule?:
> > 
> > "delete oldest least used tokens, but maintain count of x data
> > rows", x being 100,000.

I haven't done that specifically, but it is the sort of thing I use
small python scripts to do. The bogoutil -d format is easy to read and
write. In this case, sort by fields:
  
  (1) good + bad (descending)
  (2) date (descending)

Then print the first x rows.

I don't know what to do about the .MSG_COUNT, etc, when creating a new
wordlist after purging tokens.

-Bill
-- 
Sattre Press                                      Tales of War
http://sattre-press.com/                       by Lord Dunsany
info at sattre-press.com         http://sattre-press.com/tow.html




More information about the Bogofilter mailing list