lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Lea <ian....@gmail.com>
Subject Re: How to extract Document object after the search?
Date Tue, 03 Feb 2009 10:06:30 GMT
> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message