Results 1 to 1 of 1
- 07-23-2010, 02:57 PM #1Member
- Join Date
- Jul 2010
- Rep Power
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.
Last edited by azmodan; 07-23-2010 at 04:14 PM.
- By newbiejava in forum AWT / SwingReplies: 2Last Post: 07-07-2010, 12:10 PM
- By mali in forum New To JavaReplies: 3Last Post: 03-19-2010, 02:36 PM
- By rakesh_n_mehta in forum Web FrameworksReplies: 0Last Post: 01-19-2009, 02:09 PM
- By rad in forum New To JavaReplies: 8Last Post: 08-11-2008, 02:33 AM
- By vadimf in forum EclipseReplies: 0Last Post: 02-14-2008, 10:37 AM