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

Highlighter closes the given IndexReader

    XMLWordPrintableJSON

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. LUCENE-4918.patch
          4 kB
          Simon Willnauer
        2. LuceneHighlighter.java
          3 kB
          Sirvan Yahyaei

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: