[ 
https://issues.apache.org/jira/browse/LUCENE-3360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13086494#comment-13086494
 ] 

Martijn van Groningen commented on LUCENE-3360:
-----------------------------------------------

bq. True... so maybe do this patch in 2 steps? First, for 3.x. Then, merge to 
trunk, remove deprecated FC and fix all usages?
Proposal: Get everything to work with the current deprecated FieldCache. Port 
to working code to 3x. Remove deprecated FieldCache from trunk and move its 
inner classes (like DocTermsIndex) to search.cache. 

FieldCache has also some static *_PARSER fields that are used in the 
*ValuesCreator classes. I think these fields should move to *ValuesCreator 
classes as private fields. Besides the tests these fields are only used in 
*ValuesCreator classes.

> Move FieldCache to IndexReader
> ------------------------------
>
>                 Key: LUCENE-3360
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3360
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Martijn van Groningen
>             Fix For: 3.4, 4.0
>
>         Attachments: LUCENE-3360.patch, LUCENE-3360.patch, LUCENE-3360.patch
>
>
> Move the static FieldCache.DEFAULT field instance to atomic IndexReaders, so 
> that FieldCache insanity caused by the WeakHashMap no longer occurs.
> * Add a new method to IndexReader that by default throws an UOE:
> {code}public FieldCache getFieldCache(){code}
> * The SegmentReader implements this method and returns its own internal 
> FieldCache implementation. This implementation just uses a 
> HashMap<Entry<T>,Object>> to store entries.
> * The SlowMultiReaderWrapper implements this method as well and basically 
> behaves the same as the current FieldCacheImpl.
> This issue won't solve the insanity that comes from inconsistent usage of a 
> single field (for example retrieve both int[] and DocTermIndex for the same 
> field). 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Reply via email to