Lucene - Core
  1. Lucene - Core
  2. LUCENE-1587

RangeQuery equals method does not compare collator property fully

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.1
    • Fix Version/s: 2.9
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      The equals method in the range query has the collator comparison implemented as:
      (this.collator != null && ! this.collator.equals(other.collator))

      When this.collator = null and other.collator = someCollator this method will incorrectly assume they are equal.

      So adding something like

      (this.collator == null && other.collator != null)
      would fix the problem

        Activity

        Hide
        Mark Miller added a comment -

        Thanks Mark!

        Show
        Mark Miller added a comment - Thanks Mark!

          People

          • Assignee:
            Mark Miller
            Reporter:
            Mark Platvoet
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development