Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-3360

Move FieldCache to IndexReader

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • 3.6, 4.0-ALPHA
    • None
    • None
    • New

    Description

      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:
        public FieldCache getFieldCache()
      • 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).

      Attachments

        1. LUCENE-3360.patch
          305 kB
          Martijn van Groningen
        2. LUCENE-3360.patch
          96 kB
          Martijn van Groningen
        3. LUCENE-3360.patch
          95 kB
          Martijn van Groningen
        4. LUCENE-3360.patch
          96 kB
          Martijn van Groningen
        5. LUCENE-3360.patch
          79 kB
          Martijn van Groningen
        6. LUCENE-3360.patch
          78 kB
          Martijn van Groningen
        7. LUCENE-3360.patch
          24 kB
          Martijn van Groningen
        8. LUCENE-3360-3x.patch
          149 kB
          Martijn van Groningen
        9. LUCENE-3360-3x.patch
          110 kB
          Martijn van Groningen
        10. LUCENE-3360-3x.patch
          103 kB
          Martijn van Groningen

        Issue Links

          Activity

            People

              Unassigned Unassigned
              martijn.v.groningen Martijn van Groningen
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: