Lucene - Core
  1. Lucene - Core
  2. LUCENE-6558

Highlighter not working for CustomScoreQuery

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.2
    • Fix Version/s: 5.3, 6.0
    • Component/s: modules/highlighter
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Highlighter and FastVectorHighlighter not working for CustomScoreQuery

      CustomScoreQuery query = new CustomScoreQuery(termQuery);
      QueryScorer scorer = new QueryScorer(query, FIELD_NAME);
      Highlighter highlighter = new Highlighter(scorer);
      ...
      String fragment = highlighter.getBestFragment(stream, storedField); // always return null
      
      1. LUCENE-6558.patch
        14 kB
        Cao Manh Dat

        Activity

        Hide
        Cao Manh Dat added a comment -

        Here is patch file for this issue.

        Show
        Cao Manh Dat added a comment - Here is patch file for this issue.
        Hide
        Cao Manh Dat added a comment -

        This bug appear both in PostHIghlighter and FastVectorHighlighter. Should I create three different issues or merge all issues to this one?

        Show
        Cao Manh Dat added a comment - This bug appear both in PostHIghlighter and FastVectorHighlighter. Should I create three different issues or merge all issues to this one?
        Hide
        Michael McCandless added a comment -

        This is a good catch, thank you Cao Manh Dat!

        Should I create three different issues or merge all issues to this one?

        I think it's fine to fix all three with a single patch on this issue? Thank you!

        Show
        Michael McCandless added a comment - This is a good catch, thank you Cao Manh Dat ! Should I create three different issues or merge all issues to this one? I think it's fine to fix all three with a single patch on this issue? Thank you!
        Hide
        Cao Manh Dat added a comment - - edited

        Here is patch file for this issue (fix on both Highlighter and FastVectorHighlighter).
        Confirm that PostHighlighter not fail for this bug.
        Thanks Michael McCandless for fast response!

        Show
        Cao Manh Dat added a comment - - edited Here is patch file for this issue (fix on both Highlighter and FastVectorHighlighter). Confirm that PostHighlighter not fail for this bug. Thanks Michael McCandless for fast response!
        Hide
        ASF subversion and git services added a comment -

        Commit 1685114 from Michael McCandless in branch 'dev/trunk'
        [ https://svn.apache.org/r1685114 ]

        LUCENE-6558: fix highlighters to work with CustomScoreQuery

        Show
        ASF subversion and git services added a comment - Commit 1685114 from Michael McCandless in branch 'dev/trunk' [ https://svn.apache.org/r1685114 ] LUCENE-6558 : fix highlighters to work with CustomScoreQuery
        Hide
        ASF subversion and git services added a comment -

        Commit 1685117 from Michael McCandless in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1685117 ]

        LUCENE-6558: fix highlighters to work with CustomScoreQuery

        Show
        ASF subversion and git services added a comment - Commit 1685117 from Michael McCandless in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1685117 ] LUCENE-6558 : fix highlighters to work with CustomScoreQuery
        Hide
        Michael McCandless added a comment -

        Thanks Cao Manh Dat!

        Show
        Michael McCandless added a comment - Thanks Cao Manh Dat !
        Hide
        Shalin Shekhar Mangar added a comment -

        Bulk close for 5.3.0 release

        Show
        Shalin Shekhar Mangar added a comment - Bulk close for 5.3.0 release

          People

          • Assignee:
            Unassigned
            Reporter:
            Cao Manh Dat
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development