[
https://issues.apache.org/jira/browse/LUCENE-3360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13114343#comment-13114343
]
Martijn van Groningen edited comment on LUCENE-3360 at 9/25/11 8:06 PM:
------------------------------------------------------------------------
Attached an updated version for trunk.
* FieldCache and FieldCacheImpl have been removed completely from the source
code.
* DocTerms and DocTermsIndex have been moved to o.a.l.search.cache
* Parsers have been moved to o.a.l.search.cache.parser
* Functionality that relies on top level caches (e.g. faceting and some
functions) now uses SlowMultiReaderWrapper: {code}new
SlowMultiReaderWrapper(topReader).getFieldCache(){code}
was (Author: martijn.v.groningen):
Attached an updated version for trunk.
* FieldCache and FieldCacheImpl have been removed completely from the source
code.
* DocTerms and DocTermsIndex have been moved to o.a.l.search.cache
* Parsers have been moved to o.a.l.search.cache.parser
* Functionality that relies on top level caches (e.g. faceting and some
functions) now uses SlowMultiReaderWrapper: {code}new
SlowMultiReaderWrapper(topReader)).getFieldCache(){code}
> 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.5, 4.0
>
> Attachments: LUCENE-3360-3x.patch, LUCENE-3360.patch,
> LUCENE-3360.patch, LUCENE-3360.patch, LUCENE-3360.patch, 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: [email protected]
For additional commands, e-mail: [email protected]