[Xapian-discuss] xapian-compact

Jim jim at fayettedigital.com
Wed Aug 22 20:55:24 BST 2007


Hm, let me try this again.  How does xapian-compact behave if there are 
entries in both databases that are being compacted?  Is it smart enough 
to use the newer one?  Or the first one?  Or the last one?

If there is an existing db in the target directory of an xapian-compact 
command, is it simply overwritten?  Is it also part of the merger?

Thanks,
Jim.
Jim wrote:
> What happens to the data in an existing db if that directory is the 
> target of xapian-compact?
>
> For instance, I have  db1 and db2 and temp directories.  temp is 
> new/updated data, db1 and db2 are production databases that I swap on 
> a daily basis, e. g.
>
> db1
> db2
> current->db1
>
> (psuedo code)
> if (current ==db1)
> xapian-compact temp db1 db2
> ln -sf db2 current
> else
> xapian-compact temp db2 db1
> ln -sf db1 current
> endif
>
> Do I need to clear out the target before I write?
>
> Actually brings up another question.  If temp and db1 (first case) 
> have duplicate records in each, which one gets selected?  Is there a 
> date kept?
>
> Thanks,
> Jim.
>
> _______________________________________________
> Xapian-discuss mailing list
> Xapian-discuss at lists.xapian.org
> http://lists.xapian.org/mailman/listinfo/xapian-discuss
>




More information about the Xapian-discuss mailing list