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

Allow IndexWriter to commit, even just commitData

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1, 6.0
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      Spinoff from here http://lucene.472066.n3.nabble.com/commit-with-only-commitData-td4022155.html.

      In some cases, it is valuable to be able to commit changes to the index, even if the changes are just commitData. Such data is sometimes used by applications to register in the index some global application information/state.

      The proposal is:

      • Add a setCommitData() API and separate it from commit() and prepareCommit() (simplify their API)
      • When that API is called, flip on the dirty/changes bit, so that this gets committed even if no other changes were made to the index.

      I will work on a patch a post.

        Attachments

        1. LUCENE-4575-testcase.patch
          2 kB
          Michael McCandless
        2. LUCENE-4575.patch
          6 kB
          Shai Erera
        3. LUCENE-4575.patch
          27 kB
          Shai Erera
        4. LUCENE-4575.patch
          31 kB
          Shai Erera

          Activity

            People

            • Assignee:
              shaie Shai Erera
              Reporter:
              shaie Shai Erera
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: