Results 1 to 1 of 1
  1. #1
    azmodan is offline Member
    Join Date
    Jul 2010
    Rep Power

    Default 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 05:14 PM.

Similar Threads

  1. is it possible to dock Internal-Frame?
    By newbiejava in forum AWT / Swing
    Replies: 2
    Last Post: 07-07-2010, 01:10 PM
  2. Passing a value between internal frames
    By mali in forum New To Java
    Replies: 3
    Last Post: 03-19-2010, 02:36 PM
  3. The server encountered an internal error ()
    By rakesh_n_mehta in forum Web Frameworks
    Replies: 0
    Last Post: 01-19-2009, 02:09 PM
  4. Getting internal frame out
    By rad in forum New To Java
    Replies: 8
    Last Post: 08-11-2008, 03:33 AM
  5. Eclipse's internal Tomcat
    By vadimf in forum Eclipse
    Replies: 0
    Last Post: 02-14-2008, 10:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts