Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      This interface existed for backcompat, so that each impl had at least some common minimal interface, and could be used by StandardTokenizer. However, in LUCENE-5999 backcompat for standard tokenizer was implemented using separate named classes. We should remove this interface, as it no longer serves a purpose.

        Activity

        Hide
        Ryan Ernst added a comment -

        Simple patch removing the interface.

        Show
        Ryan Ernst added a comment - Simple patch removing the interface.
        Hide
        Robert Muir added a comment -

        Looks good. Can you delete the actual interface file? I don't see it nuked in the patch.

        I think this is ok to commit, personally i would go just a step further and instead remove StandardTokenizerImpl and so on too. without the interface, this abstraction isn't needed, the StandardTokenizer.jflex can just generate StandardTokenizer.java and StandardTokenizer40.jflex -> StandardTokenizer40.java and so on.

        Show
        Robert Muir added a comment - Looks good. Can you delete the actual interface file? I don't see it nuked in the patch. I think this is ok to commit, personally i would go just a step further and instead remove StandardTokenizerImpl and so on too. without the interface, this abstraction isn't needed, the StandardTokenizer.jflex can just generate StandardTokenizer.java and StandardTokenizer40.jflex -> StandardTokenizer40.java and so on.
        Hide
        ASF subversion and git services added a comment -

        Commit 1630292 from Ryan Ernst in branch 'dev/trunk'
        [ https://svn.apache.org/r1630292 ]

        LUCENE-6000: Removed StandardTokenizerInterface

        Show
        ASF subversion and git services added a comment - Commit 1630292 from Ryan Ernst in branch 'dev/trunk' [ https://svn.apache.org/r1630292 ] LUCENE-6000 : Removed StandardTokenizerInterface
        Hide
        ASF subversion and git services added a comment -

        Commit 1630295 from Ryan Ernst in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1630295 ]

        LUCENE-6000: Removed StandardTokenizerInterface

        Show
        ASF subversion and git services added a comment - Commit 1630295 from Ryan Ernst in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1630295 ] LUCENE-6000 : Removed StandardTokenizerInterface
        Hide
        Ryan Ernst added a comment -

        I checked in as is (with the deletion of course), but I don't have a problem with continuing this work to nuke the Impl classes. The only caveat I see is this would require embedding a small amount of java code (100+ lines or so?) into the jflex files. This may not be ideal if/when the tokenizer api is tweaked, and this functions need to be iterated on. But that is so rare it probably doesn't matter. Or maybe I am missing something and it is simpler than it looks to me. Either way, if you feel getting rid of the separate impls will make this even cleaner, then we can open another issue and I'm happy to help there.

        Show
        Ryan Ernst added a comment - I checked in as is (with the deletion of course), but I don't have a problem with continuing this work to nuke the Impl classes. The only caveat I see is this would require embedding a small amount of java code (100+ lines or so?) into the jflex files. This may not be ideal if/when the tokenizer api is tweaked, and this functions need to be iterated on. But that is so rare it probably doesn't matter. Or maybe I am missing something and it is simpler than it looks to me. Either way, if you feel getting rid of the separate impls will make this even cleaner, then we can open another issue and I'm happy to help there.
        Hide
        ASF subversion and git services added a comment -

        Commit 1630311 from Ryan Ernst in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1630311 ]

        LUCENE-6000: Fix backport compile issue

        Show
        ASF subversion and git services added a comment - Commit 1630311 from Ryan Ernst in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1630311 ] LUCENE-6000 : Fix backport compile issue
        Hide
        Robert Muir added a comment -

        The only caveat I see is this would require embedding a small amount of java code (100+ lines or so?) into the jflex files.

        Actually I don't like that caveat much either. It makes the code harder to refactor and maintain. We can think about it later, but its already much better here.

        Show
        Robert Muir added a comment - The only caveat I see is this would require embedding a small amount of java code (100+ lines or so?) into the jflex files. Actually I don't like that caveat much either. It makes the code harder to refactor and maintain. We can think about it later, but its already much better here.
        Hide
        Anshum Gupta added a comment -

        Bulk close after 5.0 release.

        Show
        Anshum Gupta added a comment - Bulk close after 5.0 release.

          People

          • Assignee:
            Ryan Ernst
            Reporter:
            Ryan Ernst
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development