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

Minor improvement to JavaDoc for ScoreDocComparator

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 2.1
    • 2.2
    • general/javadocs
    • None
    • New, Patch Available

    Description

      About to attach a very small patch for ScoreDocComparator which broadens the contract of compare(ScoreDoc, ScoreDoc) to follow the same semantics as java.util.Comparator.compare() – allow any integer to be returned, rather than specifically -1/0/-1.

      Note that this behaviour must already be acceptable; the anonymous ScoreDocComparators returned by FieldSortedHitQueue.comparatorStringLocale() already return the result of Collator.compare(), which is not tied to this -1/0/1 restriction.

      Attachments

        1. ScoreDocComparator.patch
          0.8 kB
          Paul Cowan

        Activity

          People

            Unassigned Unassigned
            pcowan Paul Cowan
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: