lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (Commented) (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3360) Move FieldCache to IndexReader
Date Thu, 23 Feb 2012 11:49:49 GMT


Robert Muir commented on LUCENE-3360:

FieldCache only takes AtomicReader now... so the insanity trap is already removed in trunk.

We have alternative ways to 'fieldcache' at index-time, by using SortedBytes docvalues field.
I was originally skeptical of SortedBytes (especially given its initial impl problems), but
been cleaned up a lot recently, I think its the direction should really move forwards to.

There is also progress on more efficient implementations by doing more at indexing time: e.g.


As an "index" the idea is to compute things up-front so that searches are faster: I don't
think lucene core needs to support 'uninverting at runtime' ?!

So I think we should start a plan for how FieldCache can be moved to contrib or deprecated

> Move FieldCache to IndexReader
> ------------------------------
>                 Key: LUCENE-3360
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Martijn van Groningen
>             Fix For: 3.6, 4.0
>         Attachments: LUCENE-3360-3x.patch, LUCENE-3360-3x.patch, 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.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


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

View raw message