[ 
https://issues.apache.org/jira/browse/SOLR-1508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12765214#action_12765214
 ] 

Tom Hill commented on SOLR-1508:
--------------------------------

The key thing I was trying to achieve here was to use per-segment caches. 

To do this, I think I need to know which SegmentReader is handling the segment 
containing the doc I care about. Unfortunately, DirectoryReader.readerIndex() 
and DirectoryReader.starts() are both private, and I _think_ I need this 
information to get the cache on a per-segment basis. Corrections welcome!

I went with modifying IndexReader, as the IndexReader hides the implementation. 
With this approach, the callers code works, even if the implementation changes; 
if someone is wraps your DirectoryReader in a FilterReader, you still just 
called getFieldCachedValue.

Any alternate suggestions for getting per-segment caches?

Thanks!

 

> Use field cache when creating response, if available and configured.
> --------------------------------------------------------------------
>
>                 Key: SOLR-1508
>                 URL: https://issues.apache.org/jira/browse/SOLR-1508
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>    Affects Versions: 1.3
>            Reporter: Tom Hill
>
> Allow the user to configure a field to be returned to the user from the field 
> cache, instead of getting the field from disk. Relies on lucene-1981

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to