Lucene - Core
  1. Lucene - Core
  2. LUCENE-807

Minor improvement to JavaDoc for ScoreDocComparator

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.2
    • Component/s: general/javadocs
    • Labels:
      None
    • Lucene Fields:
      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.

        Activity

        Hide
        Michael Busch added a comment -

        Committed. Thank you, Paul!

        Show
        Michael Busch added a comment - Committed. Thank you, Paul!
        Hide
        Paul Cowan added a comment -

        Amends javadoc.

        Show
        Paul Cowan added a comment - Amends javadoc.

          People

          • Assignee:
            Unassigned
            Reporter:
            Paul Cowan
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development