lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yonik Seeley <yo...@lucidimagination.com>
Subject Re: FieldCache usage for custom field collapse in solr 1.4
Date Mon, 06 Dec 2010 17:42:14 GMT
On Sun, Dec 5, 2010 at 6:12 PM, Adam H. <jimmoefoe@gmail.com> wrote:
> StringIndex fieldCacheVals = FieldCache.DEFAULT.getStringIndex(reader,
> collapseField);
>
> where 'reader' is the instance of the SolrIndexReader passed along to the
> component with the ResponseBuilder.SolrQueryRequest object.
>
> As I understand, this can double memory usage due to (re)loading this
> fieldcache on a reader-wide basis rather than on a per segment basis?

Yep.  Sorting and function queries use per-segment FieldCache entries.
So If you also request a FieldCache from the top level reader, it
won't reuse the per-segment caches and hence will take up 2x memory
over just using per-segment.

Solr's field collapsing already works on a per-segment basis... if
your needs are at all general, it could make sense to try and get it
rolled into solr rather than implementing custom code.

-Yonik
http://www.lucidimagination.com

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


Mime
View raw message