[Xapian-discuss] xapian-compact 1.0.1
Olly Betts
olly at survex.com
Thu Jun 28 16:48:34 BST 2007
On Thu, Jun 28, 2007 at 05:23:50PM +0200, Tomasz Jackowiak wrote:
> I'm using Xapian-core 1.0.1 and it seems that xapian-compact is
> reindexing documents' 'docid' even when merging only one database. I
> don't remember such behavior under version 0.9.9. Is it a feature or a
> bug? I can't find any information about that change.
It's a feature - this is the 1.0.0 NEWS file entry:
* xapian-compact: Now prunes unused docids off the start of each source
database's range of docids.
All document ids in a particular source database are translated by the
same amount - actually renumbering to remove any gaps would be a lot
more expensive, whereas eliminating a gap at the start is almost no
extra work.
If you have a rolling index where old documents are removed after a
while, this is useful even when compacting a single database as it keeps
the document ids small, which means the database ends up a bit smaller.
I can see it could be awkward if the docids are matched to an external
database though. It could be made optional if it's a problem for some
uses.
Cheers,
Olly
More information about the Xapian-discuss
mailing list