Lucene - Core
  1. Lucene - Core
  2. LUCENE-3606

Make IndexReader really read-only in Lucene 4.0

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0-ALPHA
    • Fix Version/s: 3.6, 4.0-ALPHA
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      As we change API completely in Lucene 4.0 we are also free to remove read-write access and commits from IndexReader. This code is so hairy and buggy (as investigated by Robert and Mike today) when you work on SegmentReader level but forget to flush in the DirectoryReader, so its better to really make IndexReaders readonly.

      Currently with IndexReader you can do things like:

      • delete/undelete Documents -> Can be done by with IndexWriter, too (using deleteByQuery)
      • change norms -> this is a bad idea in general, but when we remove norms at all and replace by DocValues this is obsolete already. Changing DocValues should also be done using IndexWriter in trunk (once it is ready)
      1. LUCENE-3606.patch
        541 kB
        Uwe Schindler
      2. LUCENE-3606-deprecations3x.patch
        31 kB
        Uwe Schindler
      3. LUCENE-3606-deprecations3x.patch
        28 kB
        Uwe Schindler
      4. LUCENE-3606-deprecations3x.patch
        26 kB
        Uwe Schindler
      5. LUCENE-3606-hideMethodAgain.patch
        3 kB
        Uwe Schindler

        Issue Links

          Activity

            People

            • Assignee:
              Uwe Schindler
              Reporter:
              Uwe Schindler
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development