You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Geet Gangwar <ge...@gmail.com> on 2014/01/01 09:41:52 UTC

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

RE: Lazy Loading

Posted by Uwe Schindler <uw...@thetaphi.de>.
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: uwe@thetaphi.de


> -----Original Message-----
> From: Geet Gangwar [mailto:geetgangwar@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 <uw...@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: uwe@thetaphi.de
> >
> > > -----Original Message-----
> > > From: Geet Gangwar [mailto:geetgangwar@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-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Lazy Loading

Posted by Geet Gangwar <ge...@gmail.com>.
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 <uw...@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: uwe@thetaphi.de
>
> > -----Original Message-----
> > From: Geet Gangwar [mailto:geetgangwar@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-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

RE: Lazy Loading

Posted by Uwe Schindler <uw...@thetaphi.de>.
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: uwe@thetaphi.de

> -----Original Message-----
> From: Geet Gangwar [mailto:geetgangwar@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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org