Hi,

I have an existing database of documents, and I'd like to add a value to
each of the documents without having to recreate the entire database.

The only way I've thought of to do this is to open the database, get
each document sequentially, add the relevant value, and then replace the
existing version of the document with the upated copy, using the docid.

Is that my only option, or is there a better way to do it?

I'm using the Python bindings against xapian-1.0.4 on 32-bit FreeBSD
5.4.

Thanks,
Bob

Search Discussions

  • Olly Betts at Nov 29, 2007 at 12:48 am

    On Wed, Nov 28, 2007 at 02:23:21PM -0500, Robert Parker wrote:
    I have an existing database of documents, and I'd like to add a value to
    each of the documents without having to recreate the entire database.

    The only way I've thought of to do this is to open the database, get
    each document sequentially, add the relevant value, and then replace the
    existing version of the document with the upated copy, using the docid.

    Is that my only option, or is there a better way to do it?
    That's the only option without recreating the database.

    Currently it'll probably be more efficient to recreate the database from
    scratch if you have the source data. This case could be handled a lot
    more efficiently (by noticing that the terms and document data are
    unchanged) but this optimisation isn't currently done.

    Cheers,
    Olly

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupxapian-discuss @
categoriesxapian
postedNov 28, '07 at 7:23p
activeNov 29, '07 at 12:48a
posts2
users2
websitexapian.org
irc#xapian

2 users in discussion

Olly Betts: 1 post Robert Parker: 1 post

People

Translate

site design / logo © 2021 Grokbase