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

Make ShingleAnalyzerWrapper and PerFieldAnalyzerWrapper immutable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5, 4.0-ALPHA
    • Component/s: modules/analysis
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Both ShingleAnalyzerWrapper and PerFieldAnalyzerWrapper have setters which change some state which impacts their analysis stack. If these are going to become reusable, then the state must be immutable as changing it will have no effect.

      Process will be similar to QueryAutoStopWordAnalyzer, I will remove in trunk and deprecate in 3x.

      1. LUCENE-3434-3x.patch
        17 kB
        Chris Male
      2. LUCENE-3434-trunk.patch
        21 kB
        Chris Male

        Activity

        Hide
        cmale Chris Male added a comment -

        Patches for trunk and 3x.

        Show
        cmale Chris Male added a comment - Patches for trunk and 3x.
        Hide
        rcmuir Robert Muir added a comment -

        I think you can remove the suppresswarnings and use Collections.emptyMap() instead of Collections.EMPTY_MAP ?

        Show
        rcmuir Robert Muir added a comment - I think you can remove the suppresswarnings and use Collections.emptyMap() instead of Collections.EMPTY_MAP ?
        Hide
        cmale Chris Male added a comment -

        Trunk: Committed revision 1170942. (with Robert's change)
        3x: Committed revision 1170939.

        Show
        cmale Chris Male added a comment - Trunk: Committed revision 1170942. (with Robert's change) 3x: Committed revision 1170939.
        Hide
        thetaphi Uwe Schindler added a comment -

        Bulk close after release of 3.5

        Show
        thetaphi Uwe Schindler added a comment - Bulk close after release of 3.5
        Hide
        arames Simon Arame added a comment -

        As of Lucene 3.4.0, the default Analyzer of PerFieldAnalyzerWrapper is not loaded when searching documents only with fields in the exception list.

        Show
        arames Simon Arame added a comment - As of Lucene 3.4.0, the default Analyzer of PerFieldAnalyzerWrapper is not loaded when searching documents only with fields in the exception list.
        Hide
        cmale Chris Male added a comment -

        I'm a little confused about what you mean Simon.

        Are you able to expand on that a little? What used to happen and what now happens?

        Show
        cmale Chris Male added a comment - I'm a little confused about what you mean Simon. Are you able to expand on that a little? What used to happen and what now happens?

          People

          • Assignee:
            cmale Chris Male
            Reporter:
            cmale Chris Male
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development