lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3360) Move FieldCache to IndexReader
Date Wed, 17 Aug 2011 18:32:27 GMT


Uwe Schindler commented on LUCENE-3360:

bq. 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.

They should only be public available... If ValueCreate classes are package private then its
not good. The parsers are oftenh used when the field type is know before. E.g. to circumvent
problems where the autodetection of old-style toString() numeric fields vs. NumericField is
needed. So I always specify the NF parser explicitely on FieldCache.getLong(IR, Parser). Or
is this no longer the case?

> Move FieldCache to IndexReader
> ------------------------------
>                 Key: LUCENE-3360
>                 URL:
>             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:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message