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

be more precise about IOContext for reads

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.5.1, 4.6, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      Set the context as IOContext.READ / IOContext.READONCE where applicable


      Motivation:

      Custom PostingsFormat may want to check the context on SegmentReadState and branch differently, but for this to work properly the context has to be specified correctly up the stack.

      For example, DirectPostingsFormat only loads postings into memory if the context != MERGE. However a better condition would be context == Context.READ && !context.readOnce.

        Attachments

        1. LUCENE-4998.patch
          4 kB
          Shikhar Bhushan

          Activity

            People

            • Assignee:
              mikemccand Michael McCandless
              Reporter:
              shikhar Shikhar Bhushan
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: