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

Exceptions handling in methods of SegmentingTokenizerBase

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 8.6.3
    • Fix Version/s: None
    • Component/s: modules/analysis
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      The current interface of setNextSentence and incrementWord methods in SegmentingTokenizerBase do not define the checked exceptions, which makes it troublesome to be inherited.

      For example, if we override the incrementWord  with a logic that invoke  incrementToken on another tokenizer, the incrementToken raises the IOException but the incrementWord is not defined to handle it.

      I think having setNextSentence and incrementWord handle the IOException would make the SegmentingTokenizerBase easier to be used.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              huynmg Nguyen Minh Gia Huy
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: