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

TermQuery's constructors should clone the incoming term

Details

    • Task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 5.4, 6.0
    • None
    • None
    • New

    Description

      This is a follow-up of LUCENE-6435: the bug stems from the fact that you can build term queries out of shared BytesRef objects (such as the ones returned by TermsEnum.next), which is a bit trappy. If TermQuery's constructors would clone the incoming term, we wouldn't have this trap.

      Attachments

        1. LUCENE-6821.patch
          5 kB
          Paul Elschot
        2. LUCENE-6821.patch
          9 kB
          Paul Elschot
        3. LUCENE-6821.2.patch
          13 kB
          Tommaso Teofili

        Activity

          People

            teofili Tommaso Teofili
            jpountz Adrien Grand
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: