On Tue, 2006-05-09 at 13:53 -0400, varun sood wrote: > Hi, > I have "Doc. Id" of the document stored in the database. Now I want to > query database on that "Doc. Id" (which will always return one document). > How can I do this?
Are you aware that the document number created by Lucene is considered be unsafe? This is how you do it: IndexReader ir = IndexReader.open(directory); ir.document(7); See: class IndexReader { /** * Returns the stored fields of the n:th Document * in this index. */ public abstract Document document(int n) throws IOException; } > QueryParser queryParser = new QueryParser("Doc. Id",new You can not send a document number to the QueryParser. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]