lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Bowesman <>
Subject Re: Best way to returning hits after search?
Date Thu, 01 Mar 2007 09:34:49 GMT
> If you decide to cache stored field value in memory, FieldCache may be
> useful for this - so you don't have to implement your own cache - you can
> access the field values with something like:
>    FieldCache fieldCache = FieldCache.DEFAULT;
>    String db_id_field[] =
> fieldCache.getStrings(indexReader,"DB_ID_FIELD_NAME");
> Those values are valid for the lifetime of the index-reader. Once a new
> index reader is opened, when GC collects the unused old index reader
> object, it would also be able to collect (from the cache) unused field
> values.

Thanks for the pointers Doron.  I'll take a look at that.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message