Here's a writeup I did a couple of years ago that might help... http://wiki.apache.org/lucene-java/FieldSelectorPerformance?highlight=(fieldselector)
Best Erick On Tue, Feb 3, 2009 at 5:06 AM, Ian Lea <ian....@gmail.com> wrote: > > I have not seen much time difference between when I load the single field > & > > all the fields of a document. > > That's fine - sometimes it helps, sometimes it doesn't. Depends on > the structure of your documents, maybe your hardware, maybe more. And > sometimes a small difference, over many documents, can be worth > having. > > > After search, lucene cache the documents into the memory. Is there any > way > > to configure the no. of documents to be cached into the memory? > > Umm. No, I don't believe that lucene does explicit document caching. > Your OS may well cache the data files which can make a significant > difference. See also all the recommendations elsewhere about sharing > and warming searchers. > > > what could be the benefit in using FieldSelectorResult.LOAD & > > FieldSelectorResult.LAZY_LOAD? > > If you have a document with, say, 2 small fields and 100 large fields > and in some particular circumstance you only want the 2 small ones, > using a FieldSelector like SetBasedFieldSelector, as Uwe suggested, > can help by telling lucene not to load the 100 large fields unless you > explicitly ask for them. Which you won't in this scenario. > > > If you google for something like "lucene lazy loading" you'll find > lots more info. > > > -- > Ian. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > >