hi all,i add 10000 documents into xapian database using add_document interface, then call commit_transaction, and search a word returns 8700 hits. then i delete 10000 documents. and call commit_transaction (it will call flush), then seach the same word return hits size is zero. so it means delete success. but the database size is about 200m (the folder size of index). why the database dont reduce the file. i found it does not reduce any more. so my question is ,if i continue to add and delete, the database will increse its size but no decrese? if i want control the size , what funtion can i call? 2009-8-28
On Fri, Aug 28, 2009 at 11:18:58AM +0800, ouwind wrote:> so my question is ,if i continue to add and delete, the database will > increse its size but no decrese?Currently we don't try to reduce the table size automatically, but if you add more documents, any unused space will get used before the DB files grow further.> if i want control the size , what funtion can i call?You can reclaim unused space by using the xapian-compact command. Cheers, Olly
thank you ------------------ On Fri, Aug 28, 2009 at 11:18:58AM +0800, ouwind wrote:> so my question is ,if i continue to add and delete, the database will > increse its size but no decrese?Currently we don't try to reduce the table size automatically, but if you add more documents, any unused space will get used before the DB files grow further.> if i want control the size , what funtion can i call?You can reclaim unused space by using the xapian-compact command. Cheers, Olly