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

Highlighter closes the given IndexReader

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.2, 4.2.1
    • 4.3, 6.0
    • modules/highlighter
    • None
    • New, Patch Available

    Description

      If IndexReader is passed to o.a.l.s.highlight.QueryScorer for scoring, WeightedSpanTermExtractor#getWeightedSpanTermsWithScores closes the parameter reader (IndexReader) instead of closing the member variable 'reader'. To fix, line 519 of WeightedSpanTermExtractor should be changed from IOUtils.close(reader) to IOUtils.close(this.reader).

      Attachments

        1. LuceneHighlighter.java
          3 kB
          Sirvan Yahyaei
        2. LUCENE-4918.patch
          4 kB
          Simon Willnauer

        Activity

          People

            simonw Simon Willnauer
            sirvan Sirvan Yahyaei
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: