[Xapian-discuss] indexing after replacing documents?

mark markkicks at gmail.com
Sat Aug 16 14:35:39 BST 2008


my database is continuously updated and i need to keep updating the
xapian database also.
so can i use the database.replace_document method to update the
document in xapian? also  is there anything like complete re-indexing
of the xapian that i need to do after updating the documents
completely or is it done automatically?!

thanks a lot!




        doc = xapian.Document()
        doc.set_data(t.title)
        indexer.set_document(doc)
        indexer.index_text(clean(t.title))

        doc_id_term = 'I'+str(t.id)
        doc.add_term(doc_id_term)

        database.replace_document(doc_id_term, doc)
        if t.id%10000==0:
            print t.id, time.ctime()



More information about the Xapian-discuss mailing list