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

Convert some tests to new TokenStream API, better support of cross-impl AttributeImpl.copyTo()

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.9
    • 2.9
    • modules/analysis
    • None
    • New

    Description

      This patch converts some remaining tests to the new TokenStream API and non-deprecated classes.
      This patch also enhances AttributeImpl.copyTo() of Token and TokenWrapper to also support copying e.g. TermAttributeImpl into Token. The target impl must only support all interfaces but must not be of the same type. Token and TokenWrapper use optimized coping without casting to 6 interfaces where possible.
      Maybe the special tokenizers in contrib (shingle matrix and so on using tokens to cache may be enhanced by that). Also Yonik's request for optimized copying of states between incompatible AttributeSources may be enhanced by that (possibly a new issue).

      Attachments

        1. LUCENE-1843.patch
          10 kB
          Uwe Schindler
        2. LUCENE-1843.patch
          119 kB
          Uwe Schindler
        3. LUCENE-1843.patch
          121 kB
          Uwe Schindler
        4. LUCENE-1843.patch
          128 kB
          Uwe Schindler

        Activity

          People

            uschindler Uwe Schindler
            uschindler Uwe Schindler
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: