[Xapian-discuss] get_lastdocid, multiple connections

Olly Betts olly at survex.com
Sun Mar 20 17:30:51 GMT 2005


On Fri, Mar 11, 2005 at 12:31:37PM +0000, Richard Boulton wrote:
> Note that get_lastdocid() will always return the last document ID in the
> database - not the last document ID added to the database by the current
> thread, or anything along those lines.

It's actually the "high-water mark" of document IDs for the database.
That is, it never goes down, even if you remove the highest numbered
document(s).

It simply returns the monotonic counter which is used by the backend
to allocate the document ID when you call
WriteableDatabase::add_document().

Cheers,
    Olly



More information about the Xapian-discuss mailing list