lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maurice Coyle <>
Subject document numbers
Date Wed, 11 Jun 2003 16:03:23 GMT

i wonder could someone tell me if document numbers in a lucene index are
that is, if i have an IndexReader read and i have the following code:

Document doc = read.document(45);

and later on, i have the following:

Term term = new Term(...);

TermDocs termdocs = read.termDocs(term);
    int docnum = termdocs.doc();

    if(docnum==45)System.out.println("found it!");

when the above code prints out that it has found it, is it referring to the
same document as in the first code snippet above?

sorry if this is unclear, if so just say the word and i'll elaborate.


  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message