David, please look at the Javadoc for IndexReader.  I believe the API is 
reader.document(int), where reader is an instance of IndexReader.

Otis

----- Original Message ----
From: David <[EMAIL PROTECTED]>
To: java-user@lucene.apache.org
Sent: Friday, January 12, 2007 3:10:42 AM
Subject: How to retrieve the document by document ID?

Hi all:
       How do Lucene give each document an ID  when the document is added
and  How do we retrieve a document  by document ID?  appreciate your help!
-- 
David




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to