Details

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

      Description

      It's not possible to use public methods in contrib/misc/... /HighFreqTerms from outside the package because the return type has package visibility. I propose to move TermStats class to a separate file and make it public.

      1. LUCENE-2638.patch
        3 kB
        Andrzej Bialecki

        Activity

        Hide
        Andrzej Bialecki added a comment -

        Patch with the change. If there are no objections I'll commit this shortly.

        Show
        Andrzej Bialecki added a comment - Patch with the change. If there are no objections I'll commit this shortly.
        Hide
        Mark Miller added a comment -

        +1

        Show
        Mark Miller added a comment - +1
        Hide
        Tom Burton-West added a comment -

        Just wondering if you could describe the use you have in mind.

        Tom

        Show
        Tom Burton-West added a comment - Just wondering if you could describe the use you have in mind. Tom
        Hide
        Andrzej Bialecki added a comment -

        I use this class in Luke, which admittedly is not a common use case I guess you could use it also to obtain a list of common words that are good candidates for shingling in the future (the "common grams" method).

        Anyway, as it is now the API is simply inconsistent - public methods return instances of a package-private class - so either we close the API completely, or we take this small additional step to open it for other creative uses.

        Actually, I'm inclined to make this a static inner class instead of a separate class, to avoid polluting the package with classes that are not tools.

        Show
        Andrzej Bialecki added a comment - I use this class in Luke, which admittedly is not a common use case I guess you could use it also to obtain a list of common words that are good candidates for shingling in the future (the "common grams" method). Anyway, as it is now the API is simply inconsistent - public methods return instances of a package-private class - so either we close the API completely, or we take this small additional step to open it for other creative uses. Actually, I'm inclined to make this a static inner class instead of a separate class, to avoid polluting the package with classes that are not tools.
        Hide
        Andrzej Bialecki added a comment -

        Fixed in trunk in rev. 1001664.

        Show
        Andrzej Bialecki added a comment - Fixed in trunk in rev. 1001664.

          People

          • Assignee:
            Andrzej Bialecki
            Reporter:
            Andrzej Bialecki
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development