RE: Document loading

2009-10-07 Thread Dragon Fly
Thanks. > Date: Wed, 7 Oct 2009 00:05:43 +0200 > Subject: Re: Document loading > From: simon.willna...@googlemail.com > To: java-user@lucene.apache.org > > Hi, > a call to IndexSearcher.doc(docId) will load the document. Internally > this call forwards to IndexReader.doc

Re: Document loading

2009-10-06 Thread Simon Willnauer
Hi, a call to IndexSearcher.doc(docId) will load the document. Internally this call forwards to IndexReader.document(docId) which could be very expensive because this method will load all stored document fields. I would recommend to have a look at IndexSearcher.doc(docId, FieldSelector). This meth

Document loading

2009-10-06 Thread Dragon Fly
Hi, Which of the following method actually loads the document from disk? (1) Document document = searcher.doc (docId); OR (2) string value = document.get ("FirstNameField"); It's probably searcher.doc but I just want to be sure. Thank you. ___