Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-1961

Use Lucene's Field Cache To Retrieve Stored Fields From Memory

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 1.4
    • None
    • search
    • None

    Description

      This allows the user to configure which fields should be field cached in the schema.xml file by adding the following attribute:
      fieldCached="true"

      Enabling this on a field greatly decreases the time needed to retrieve stored fields. This works on fields containing Bytes, Strings, Integers, Longs, and Floats. Enabling field cache is applicable in many scenarios. For instance, if you have a bunch of text that is indexed and not stored and you only need to retrieve a string or number associated with a document. Its applicable in any case where there are many indexed fields and not too many stored fields being retrieved. The memory consumption is not very high compared to the performance gains field cache brings.

      Memory consumption is governed by: Number of fields cached * Number of documents * 8 bytes per reference +
      SUM(Number of unique values of the field * average length of term) * 2 (chars use 2 bytes) * String overhead (40 bytes)

      Attachments

        1. field_cache.patch
          50 kB
          Stephen Bochinski
        2. field_cache.patch
          51 kB
          Stephen Bochinski
        3. patch.txt
          25 kB
          Stephen Bochinski

        Activity

          People

            Unassigned Unassigned
            sbochins Stephen Bochinski
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 101.5h
                101.5h
                Remaining:
                Remaining Estimate - 101.5h
                101.5h
                Logged:
                Time Spent - Not Specified
                Not Specified