KinoSearch::Docs::DocNums - Characteristics of KinoSearch document numbers.
Document numbers in KinoSearch start at 1. Because all valid values are positive, we can use 0 as a sentinel value:
while ( my $doc_num = $posting_list->next ) {
...
}
The document numbers used by KinoSearch are associated with a single invindex snapshot. The moment an invindex is updated, the mapping of document numbers to documents may change.
Since IndexReader objects represent a point-in-time view of an invindex, document numbers are guaranteed to remain static for the life of the reader. However, because they are not permanent, KinoSearch document numbers cannot be used as foreign keys to locate records in external data sources. If you truly need a primary key field, you must define it and populate it yourself.
Furthermore, the order of document numbers does not tell you anything about the sequence in which documents were added to the index.
Copyright 2008 Marvin Humphrey
See KinoSearch version 0.20.