can I rely on internal document id?
I can not find much on internal document ids in lucene.
I mean the integer that you use to call IndexReader.document(int N)
My question is this: while I am creating new index from scratch can I rely that the internal document id of the 1-st document will be 0, that of the second document will be 1 and so on ... that of the N-th added document will be (N-1)?
EDIT: I forgot to mention that I am using the latest version 3 of lucene. I tested this and I saw that it works this way. But I am wondering whether it is implemented to work like this or my test/observation is just a lucky coincidence? Thanks for any responses!
I know that the internal document ids are subject to change while making index optimizations and merging indexes.
I am not doing any of this! I am simply indexing few million documents. I am not doing any deletions too.