Branch: Tag:

2007-11-16

2007-11-16 10:12:03 by Marcus Wellhardh <wellhard@roxen.com>

Fix for [RT 10311] (partial). Added support for purge so documents will be removed from the index, i.e. add documents to the deleted_document table when a directory/file are purged. Also added a new button "Run Database Maintenance" in the "Database Profile/DB Settings" tab.

Rev: lib/modules/Search.pmod/Database.pmod/Base.pike:1.6
Rev: lib/modules/Search.pmod/Database.pmod/MySQL.pike:1.86
Rev: lib/modules/Search.pmod/Queue.pmod/Base.pike:1.2
Rev: lib/modules/Search.pmod/Queue.pmod/MySQL.pike:1.21

250:    db->query("delete from "+table+" where uri_md5=%s", to_md5((string)uri));   }    + void remove_uri_prefix(string|Standards.URI uri) + { +  string uri_string = (string)uri; +  foreach(indices(hascache), string _uri) +  if(has_prefix(_uri, uri_string)) +  hascache[_uri]=0; +  +  db->query("delete from "+table+" where uri like '" + db->quote(uri_string) + "%%'"); + } +    void clear_stage( int ... stages )   {    foreach( stages, int s )