Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor 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).

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

        Activity

        Hide
        Sirvan Yahyaei added a comment -

        I have attached a simple class to show the issue.

        Show
        Sirvan Yahyaei added a comment - I have attached a simple class to show the issue.
        Hide
        Simon Willnauer added a comment -

        argh, I guess that was my fault. I will add a test and dig

        Show
        Simon Willnauer added a comment - argh, I guess that was my fault. I will add a test and dig
        Hide
        Simon Willnauer added a comment -

        here is a patch

        Show
        Simon Willnauer added a comment - here is a patch
        Hide
        Simon Willnauer added a comment -

        committed thanks!

        Show
        Simon Willnauer added a comment - committed thanks!
        Hide
        Uwe Schindler added a comment -

        Closed after release.

        Show
        Uwe Schindler added a comment - Closed after release.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development