Lucene - Core
  1. Lucene - Core
  2. LUCENE-3431

Make QueryAutoStopWordAnalyzer immutable and reusable

    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

      Currently QueryAutoStopWordAnalyzer allows its list of stop words to be changed after instantiation through its addStopWords() methods. This stops the Analyzer from being reusable since it must instantiate its StopFilters every time.

      Having these methods means that although the Analyzer can be instantiated once and reused between IndexReaders, the actual analysis stack is not reusable (which is probably the more expensive part).

      So lets change the Analyzer so that its stop words are set at instantiation time, facilitating reuse.

      1. LUCENE-3431-3x.patch
        20 kB
        Chris Male
      2. LUCENE-3431-trunk.patch
        23 kB
        Chris Male

        Activity

        Hide
        Chris Male added a comment -

        Patch against trunk (no deprecations). All functionality is moved to constructors. Tests are cleaned up and renamed.

        Will make a 3x patch with deprecations.

        Show
        Chris Male added a comment - Patch against trunk (no deprecations). All functionality is moved to constructors. Tests are cleaned up and renamed. Will make a 3x patch with deprecations.
        Hide
        Chris Male added a comment -

        Patch for 3x with deprecations.

        Show
        Chris Male added a comment - Patch for 3x with deprecations.
        Hide
        Chris Male added a comment -

        3x:
        Committed revision 1170423.

        Trunk:
        Committed revision 1170424.

        I will tackle proper reusability along with the other remaining Analyzers.

        Show
        Chris Male added a comment - 3x: Committed revision 1170423. Trunk: Committed revision 1170424. I will tackle proper reusability along with the other remaining Analyzers.
        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

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development