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

Highlighter closes the given IndexReader

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.2, 4.2.1
    • Fix Version/s: 4.3, 6.0
    • Component/s: modules/highlighter
    • Labels:
      None
    • Lucene Fields:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: