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

MultiTermQuery mutability can cause assertion failures in BooleanQuery

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      BooleanQuery caches its hashcode on the grounds that it is immutable. However, this immutability doesn't hold if some of its clauses hold queries that are not themselves immutable - for example, a MultiTermQuery with a changeable rewrite method. If one of these clauses is mutated after the hashcode has been calculated, then the next time the parent BooleanQuery is used the assertion in BooleanQuery.hashCode() will fail.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              romseygeek Alan Woodward
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: