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

Make WildcardTermEnum#difference() non-final

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.9
    • 2.9
    • core/search
    • None
    • New, Patch Available

    Description

      The method WildcardTermEnum#difference() is declared final. I found it very useful to subclass WildcardTermEnum to implement different scoring for exact vs. partial matches. The change is rather trivial (attached) but I guess it could make life easier for a couple of users.

      I attached two patches:

      • one which contains the single change to make difference() non-final (WildcardTermEnum.patch)
      • one which does also contain some minor cleanup of WildcardTermEnum. I removed unnecessary member initialization and made those final. ( WildcardTermEnum_cleanup.patch)

      Thanks simon

      Attachments

        1. WildcardTermEnum.patch
          0.4 kB
          Simon Willnauer
        2. WildcardTermEnum_cleanup.patch
          2 kB
          Simon Willnauer
        3. WildcardTermEnum_cleanup_2nd.patch
          2 kB
          Simon Willnauer

        Activity

          People

            mikemccand Michael McCandless
            simonw Simon Willnauer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: