lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <erickerick...@gmail.com>
Subject Re: FieldCache for Search
Date Sat, 28 Jul 2007 19:30:17 GMT
You might try lazy loading. See
IndexReader.*document<file:///C:/lucene-2.1.0/docs/api/org/apache/lucene/index/IndexReader.html#document%28int,%20org.apache.lucene.document.FieldSelector%29>
*(int n, FieldSelector<file:///C:/lucene-2.1.0/docs/api/org/apache/lucene/document/FieldSelector.html>
 fieldSelector),
particularly the FieldSelector. It allows you to selectively load only the
fields you want.

Otherwise, I'm sure if you looked in the unit tests you'd find examples
of how to use FieldCache. If your fields are really that huge, I'm not
sure how FieldCache would help you all that much before you'd run out
of memory. Perhaps you could outline your problem in more detail
and get some better answers.....

Best
Erick

On 7/24/07, Askar Zaidi <askar.zaidi@gmail.com> wrote:
>
> Hey Guys,
>
> From what I understand, FieldCache is used to store only the field
> required
> for search. I am using a Document object and then using doc.get("item").
> One
> of my fields is HUGE, so using Document will slow things down.
>
> How can I use FieldCache ? an example ?
>
> thanks,
> AZ
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message