Lucene - Core
  1. Lucene - Core
  2. LUCENE-3434

Make ShingleAnalyzerWrapper and PerFieldAnalyzerWrapper immutable

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major 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-trunk.patch
        21 kB
        Chris Male
      2. LUCENE-3434-3x.patch
        17 kB
        Chris Male

        Activity

        Hide
        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
        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?
        Hide
        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
        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.
        Uwe Schindler made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Uwe Schindler added a comment -

        Bulk close after release of 3.5

        Show
        Uwe Schindler added a comment - Bulk close after release of 3.5
        Chris Male made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Chris Male [ cmale ]
        Fix Version/s 3.5 [ 12317877 ]
        Fix Version/s 4.0 [ 12314025 ]
        Resolution Fixed [ 1 ]
        Hide
        Chris Male added a comment -

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

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

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

        Show
        Robert Muir added a comment - I think you can remove the suppresswarnings and use Collections.emptyMap() instead of Collections.EMPTY_MAP ?
        Chris Male made changes -
        Field Original Value New Value
        Attachment LUCENE-3434-3x.patch [ 12494387 ]
        Attachment LUCENE-3434-trunk.patch [ 12494388 ]
        Hide
        Chris Male added a comment -

        Patches for trunk and 3x.

        Show
        Chris Male added a comment - Patches for trunk and 3x.
        Chris Male created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development