You can write your own StoredFieldVisitor that excludes the document fields you don't want to have (and pass it to IndexReader.getDocument()). But keep in mind, that the underlying data structures do not support lazy loading at all. So whenever you want to load a single document field, the underlying codec has to load and iterate all fields. It can just ignore to load the field data.
Uwe ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -----Original Message----- > From: Geet Gangwar [mailto:geetgang...@gmail.com] > Sent: Wednesday, January 01, 2014 2:29 PM > To: java-user@lucene.apache.org > Subject: Re: Lazy Loading > > Thanks Uwe, > > Is there any way I can implement this using lucene 4 ? > > Regards > > Geet. > > > On Wed, Jan 1, 2014 at 3:55 PM, Uwe Schindler <u...@thetaphi.de> wrote: > > > Hi, > > > > Lazy stored field loading is no longer available with Lucene 4. There > > is only an emulation layer, but which does in fact not do lazy loading > > (it just emulates for backwards compatibility) in the misc module. > > > > Uwe > > > > ----- > > Uwe Schindler > > H.-H.-Meier-Allee 63, D-28213 Bremen > > http://www.thetaphi.de > > eMail: u...@thetaphi.de > > > > > -----Original Message----- > > > From: Geet Gangwar [mailto:geetgang...@gmail.com] > > > Sent: Wednesday, January 01, 2014 9:42 AM > > > To: java-user@lucene.apache.org > > > Subject: Lazy Loading > > > > > > Hi, > > > > > > I was trying to search for Lazy loading using lucene api, but not > > > able > > to figure > > > out how to implement it, Please help me. > > > > > > Regards > > > > > > Geet > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > > For additional commands, e-mail: java-user-h...@lucene.apache.org > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org