On Sun, Dec 5, 2010 at 6:12 PM, Adam H. <jimmoe...@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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to