Lucene - Core
  1. Lucene - Core
  2. LUCENE-2457

QueryNode implementors should override equals method

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 4.9, 5.0
    • Component/s: core/queryparser
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Discussed on thread: http://markmail.org/thread/gjqk35t7e3y4fo5j

      "QueryNode(s) are data objects, and it makes sense to override
      their equals method. But before, we need to define what is a QueryNode
      equality. Should two nodes be considered equal if they represent
      syntactically or semantically the same query? e.g. an ORQueryNode created
      from the query <a OR b OR c> will not have the same children ordering as the
      query <b OR c OR a>, so they are syntactically not equal, but they are
      semantically equal, because the order of the OR operands (usually) does not
      matter when the query is executed. I say it usually does not matter, because
      it's up to the Query object implementation built from that ORQueryNode
      object, for this reason, I vote for defining that two query nodes should be
      equals if they are syntactically equal.

      I also vote for excluding query node tags from the equality check, because
      they are not meant to represent the query structure, but to attach extra
      info to the node, which is usually used for communication between
      processors."

        Activity

        Hide
        Shai Erera added a comment -

        Open for 8 months with no patch or comments. Moving to 3.2 (though I think we can close it for "lack of interest", if we had such category).

        Show
        Shai Erera added a comment - Open for 8 months with no patch or comments. Moving to 3.2 (though I think we can close it for "lack of interest", if we had such category).
        Hide
        Adriano Crestani added a comment -

        Hi Shai,

        Please, don't close it, this is a nice feature, mainly for automated tests. I haven't had time to give attention to it yet, but keep it in the open lis for now,t so we don't forget it

        Show
        Adriano Crestani added a comment - Hi Shai, Please, don't close it, this is a nice feature, mainly for automated tests. I haven't had time to give attention to it yet, but keep it in the open lis for now,t so we don't forget it
        Hide
        Robert Muir added a comment -

        bulk move 3.2 -> 3.3

        Show
        Robert Muir added a comment - bulk move 3.2 -> 3.3
        Hide
        Hoss Man added a comment -

        Bulk of fixVersion=3.6 -> fixVersion=4.0 for issues that have no assignee and have not been updated recently.

        email notification suppressed to prevent mass-spam
        psuedo-unique token identifying these issues: hoss20120321nofix36

        Show
        Hoss Man added a comment - Bulk of fixVersion=3.6 -> fixVersion=4.0 for issues that have no assignee and have not been updated recently. email notification suppressed to prevent mass-spam psuedo-unique token identifying these issues: hoss20120321nofix36
        Hide
        Steve Rowe added a comment -

        Bulk move 4.4 issues to 4.5 and 5.0

        Show
        Steve Rowe added a comment - Bulk move 4.4 issues to 4.5 and 5.0
        Hide
        Uwe Schindler added a comment -

        Move issue to Lucene 4.9.

        Show
        Uwe Schindler added a comment - Move issue to Lucene 4.9.

          People

          • Assignee:
            Unassigned
            Reporter:
            Adriano Crestani
          • Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development