[Xapian-discuss] Merging databases

Olly Betts olly at survex.com
Thu Jan 25 03:55:00 GMT 2007


On 18/01/07, Felix Antonius Wilhelm Ostmann <ostmann at websuche.de> wrote:
> What must i do when i want to merge databases with xapian-compact, but i
> have the same document in every database and i only want one (the
> newest) document in the merged database. the uniq-id is in one value,
> the date in another. What is the best way?

You'd have to write a custom merging program.  Probably the
"copy-database" example is the best starting point (despite the name,
it can also combine several databases).

Note that xapian-compact is fast because it doesn't have to "invert
the database" to create the mapping from a term to a list of
documents.  If you're dealing with large databases, your merge will be
much slower because you can't really do the same.

The easiest solution might be to avoid getting into the situation
where you need to do such merging if that's possible.

Cheers,
    Olly



More information about the Xapian-discuss mailing list