Lucene - Core
  1. Lucene - Core
  2. LUCENE-3396

Make TokenStream Reuse Mandatory for Analyzers

    Details

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

      Description

      In LUCENE-2309 it became clear that we'd benefit a lot from Analyzer having to return reusable TokenStreams. This is a big chunk of work, but its time to bite the bullet.

      I plan to attack this in the following way:

      • Collapse the logic of ReusableAnalyzerBase into Analyzer
      • Add a ReuseStrategy abstraction to Analyzer which controls whether the TokenStreamComponents are reused globally (as they are today) or per-field.
      • Convert all Analyzers over to using TokenStreamComponents. I've already seen that some of the TokenStreams created in tests need some work to be reusable (even if they aren't reused).
      • Remove Analyzer.reusableTokenStream and convert everything over to using .tokenStream (which will now be returning reusable TokenStreams).
      1. LUCENE-3396-rab.patch
        101 kB
        Chris Male
      2. LUCENE-3396-rab.patch
        103 kB
        Chris Male
      3. LUCENE-3396-rab.patch
        104 kB
        Chris Male
      4. LUCENE-3396-rab.patch
        104 kB
        Chris Male
      5. LUCENE-3396-rab.patch
        99 kB
        Chris Male
      6. LUCENE-3396-rab.patch
        102 kB
        Chris Male
      7. LUCENE-3396-rab.patch
        100 kB
        Chris Male
      8. LUCENE-3396-forgotten.patch
        9 kB
        Chris Male
      9. LUCENE-3396-remaining-analyzers.patch
        43 kB
        Chris Male
      10. LUCENE-3396-remaining-merging.patch
        181 kB
        Chris Male

        Issue Links

          Activity

          Uwe Schindler made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Hoss Man made changes -
          Link This issue breaks LUCENE-3721 [ LUCENE-3721 ]
          Chris Male made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Chris Male [ cmale ]
          Fix Version/s 4.0 [ 12314025 ]
          Resolution Fixed [ 1 ]
          Chris Male made changes -
          Attachment LUCENE-3396-remaining-merging.patch [ 12496063 ]
          Chris Male made changes -
          Attachment LUCENE-3396-remaining-analyzers.patch [ 12494599 ]
          Chris Male made changes -
          Attachment LUCENE-3396-forgotten.patch [ 12493991 ]
          Chris Male made changes -
          Attachment LUCENE-3396-rab.patch [ 12493901 ]
          Chris Male made changes -
          Attachment LUCENE-3396-rab.patch [ 12493268 ]
          Chris Male made changes -
          Attachment LUCENE-3396-rab.patch [ 12493019 ]
          Chris Male made changes -
          Attachment LUCENE-3396-rab.patch [ 12491792 ]
          Chris Male made changes -
          Attachment LUCENE-3396-rab.patch [ 12491742 ]
          Chris Male made changes -
          Attachment LUCENE-3396-rab.patch [ 12491741 ]
          Chris Male made changes -
          Field Original Value New Value
          Attachment LUCENE-3396-rab.patch [ 12491738 ]
          Chris Male created issue -

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development